]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ncpfs: return proper error from NCP_IOC_SETROOT ioctl
authorJan Kara <jack@suse.cz>
Wed, 10 Dec 2014 23:52:22 +0000 (15:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:13 +0000 (17:41 -0800)
commita682e9c28cac152e6e54c39efcf046e0c8cfcf63
treeaa6318f6b1ae5ae43471d6dbb47b5982d7ecd758
parent6ef4536e2f19c4dba3637413d73ea00b19764bc0
ncpfs: return proper error from NCP_IOC_SETROOT ioctl

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.

Fixes: 2e54eb96e2c80 ("BKL: Remove BKL from ncpfs")
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Petr Vandrovec <petr@vandrovec.name>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ncpfs/ioctl.c