From: Jan Kara <jack@xxxxxxx> Subject: 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@xxxxxxx> Cc: Petr Vandrovec <petr@xxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ncpfs/ioctl.c | 1 - 1 file changed, 1 deletion(-) diff -puN fs/ncpfs/ioctl.c~ncpfs-return-proper-error-from-ncp_ioc_setroot-ioctl fs/ncpfs/ioctl.c --- a/fs/ncpfs/ioctl.c~ncpfs-return-proper-error-from-ncp_ioc_setroot-ioctl +++ a/fs/ncpfs/ioctl.c @@ -447,7 +447,6 @@ static long __ncp_ioctl(struct inode *in result = -EIO; } } - result = 0; } mutex_unlock(&server->root_setup_lock); _ -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html