]> git.baikalelectronics.ru Git - kernel.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)
commit751c7a13470ebb65f899cfc164ee3e810b5b058a
treeaa6318f6b1ae5ae43471d6dbb47b5982d7ecd758
parent9c77644002602761f33d245313636d2d6906f827
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 ecbd32fd08bb ("BKL: Remove BKL from
ncpfs").  Propagate the errors correctly.

Coverity id: 1226925.

Fixes: ecbd32fd08bb9 ("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