+ ncpfs-fix-wrong-check-in-__ncp_ioctl.patch added to -mm tree

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

 



The patch titled
     ncpfs: fix wrong check in __ncp_ioctl()
has been added to the -mm tree.  Its filename is
     ncpfs-fix-wrong-check-in-__ncp_ioctl.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ncpfs: fix wrong check in __ncp_ioctl()
From: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>

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@xxxxxxxxx>
Cc: Julia Lawall <julia@xxxxxxx>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
Cc: Petr Vandrovec <vandrove@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ncpfs/ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/ncpfs/ioctl.c~ncpfs-fix-wrong-check-in-__ncp_ioctl fs/ncpfs/ioctl.c
--- a/fs/ncpfs/ioctl.c~ncpfs-fix-wrong-check-in-__ncp_ioctl
+++ a/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;
_

Patches currently in -mm which might be from bzolnier@xxxxxxxxx are

origin.patch
linux-next.patch
ide-use-printk_once.patch
maintainers-remove-dead-ncpfs-list.patch
ncpfs-remove-dead-url-from-documentation.patch
ncpfs-fix-wrong-check-in-__ncp_ioctl.patch
cyclades-allow-overriding-isa-defaults-also-when-the-driver-is-built-in.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux