From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Julia Lawall <julia@diku.dk>,
linux-kernel@vger.kernel.org, Dan Carpenter <error27@gmail.com>,
corbet@lwn.net, eteo@redhat.com, linware@sh.cvut.cz
Subject: [PATCH] ncpfs: fix wrong check in __ncp_ioctl()
Date: Tue, 28 Jul 2009 17:05:34 +0200 [thread overview]
Message-ID: <200907281705.35211.bzolnier@gmail.com> (raw)
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ncpfs: fix wrong check in __ncp_ioctl()
We want to check for s_inode's existence, not inode's one
(inode is always valid in this function).
This takes care of the following entry from Dan's list:
fs/ncpfs/ioctl.c +445 __ncp_ioctl(180) warning: variable derefenced before check 'inode'
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: corbet@lwn.net
Cc: eteo@redhat.com
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
fs/ncpfs/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/fs/ncpfs/ioctl.c
===================================================================
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -442,7 +442,7 @@ static int __ncp_ioctl(struct inode *ino
if (dentry) {
struct inode* s_inode = dentry->d_inode;
- if (inode) {
+ if (s_inode) {
NCP_FINFO(s_inode)->volNumber = vnum;
NCP_FINFO(s_inode)->dirEntNum = de;
NCP_FINFO(s_inode)->DosDirNum = dosde;
reply other threads:[~2009-07-28 15:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200907281705.35211.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=corbet@lwn.net \
--cc=error27@gmail.com \
--cc=eteo@redhat.com \
--cc=julia@diku.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linware@sh.cvut.cz \
--cc=vandrove@vc.cvut.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.