lkml.org 
[lkml]   [2010]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] FS: cifs, remove unneeded NULL tests
On Mon,  1 Nov 2010 16:08:55 +0100
Jiri Slaby <jslaby@suse.cz> 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@suse.cz>
> Cc: Steve French <sfrench@samba.org>
> Cc: linux-cifs@vger.kernel.org
> Cc: Jeff Layton <jlayton@redhat.com>
> Cc: Christoph Hellwig <hch@infradead.org>
> ---
> fs/cifs/file.c | 25 +++++++++++--------------
> fs/cifs/ioctl.c | 4 ----
> 2 files changed, 11 insertions(+), 18 deletions(-)
>

Reviewed-by: Jeff Layton <jlayton@redhat.com>


\
 
 \ /
  Last update: 2010-11-01 17:25    [W:0.044 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site