Re: [PATCH] mm: do_generic_file_read() never gets a NULL 'filp'argument

From: Christoph Hellwig
Date: Mon Sep 22 2008 - 04:40:05 EST


On Mon, Sep 22, 2008 at 01:33:38AM -0700, Andrew Morton wrote:
> On Mon, 22 Sep 2008 11:46:10 +0530 Krishna Kumar <krkumar2@xxxxxxxxxx> wrote:
>
> > From: Krishna Kumar <krkumar2@xxxxxxxxxx>
> >
> > The 'filp' argument to do_generic_file_read() is never NULL.
> >
>
> How did you verify this?
>
> NFS used to like passing NULL file*'s into VFS functions. I don't
> recall whether it affected do_generic_file_read().

The only thing nfsd passed a NULL file pointer in is ->fsync on
directories. If anyone did pass a NULL file pointer into
do_generic_file_read it would oops in it's very first line of code.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/