From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org,
Petr Vandrovec <petr@vandrovec.name>, Jan Kara <jack@suse.cz>,
stable@vger.kernel.org
Subject: [PATCH] ncpfs: Return proper error from NCP_IOC_SETROOT ioctl
Date: Wed, 22 Oct 2014 08:42:05 +0200 [thread overview]
Message-ID: <1413960125-24499-1-git-send-email-jack@suse.cz> (raw)
If some error happens in NCP_IOC_SETROOT ioctl, the appropriate error
return value is then (in most cases) just overwritten before we return.
This can result in reporting success to userspace although error
happened. This bug was introduced by commit 2e54eb96e2c8 (BKL: Remove
BKL from ncpfs). Propagate the errors correctly.
Coverity-id: 1226925
CC: stable@vger.kernel.org
Fixes: 2e54eb96e2c801f33d95b5dade15212ac4d6c4a5
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ncpfs/ioctl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index d5659d96ee7f..cf7e043a9447 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -447,7 +447,6 @@ static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg
result = -EIO;
}
}
- result = 0;
}
mutex_unlock(&server->root_setup_lock);
--
1.8.1.4
reply other threads:[~2014-10-22 6:42 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=1413960125-24499-1-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=petr@vandrovec.name \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).