From: Jeff Layton <jlayton@redhat.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: sfrench@samba.org, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
jirislaby@gmail.com, linux-cifs@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v2 1/1] FS: cifs, remove unneeded NULL tests
Date: Mon, 1 Nov 2010 12:23:15 -0400 [thread overview]
Message-ID: <20101101122315.5bcf6bac@tlielax.poochiereds.net> (raw)
In-Reply-To: <1288624135-24170-1-git-send-email-jslaby@suse.cz>
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>
next prev parent reply other threads:[~2010-11-01 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-01 15:08 Jiri Slaby
2010-11-01 16:23 ` Jeff Layton [this message]
2010-11-03 10:00 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101101122315.5bcf6bac@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=hch@infradead.org \
--cc=jirislaby@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrench@samba.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®