Re: [PATCH v2 1/1] FS: cifs, remove unneeded NULL tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon,  1 Nov 2010 16:08:55 +0100
Jiri Slaby <jslaby@xxxxxxx> wrote:

> Stanse found that pSMBFile in cifs_ioctl and file->f_path.dentry in
> cifs_user_write are dereferenced prior their test to NULL.
> 
> The alternative is not to dereference them before the tests. The patch is
> to point out the problem, you have to decide.
> 
> While at it we cache the inode in cifs_user_write to a local variable
> and use all over the function.
> 
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Steve French <sfrench@xxxxxxxxx>
> Cc: linux-cifs@xxxxxxxxxxxxxxx
> Cc: Jeff Layton <jlayton@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> ---
>  fs/cifs/file.c  |   25 +++++++++++--------------
>  fs/cifs/ioctl.c |    4 ----
>  2 files changed, 11 insertions(+), 18 deletions(-)
> 

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux