The patch titled sx.c: fix missed unlock_kernel() on error path in sx_fw_ioctl() has been added to the -mm tree. Its filename is sxc-fix-missed-unlock_kernel-on-error-path-in-sx_fw_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: sx.c: fix missed unlock_kernel() on error path in sx_fw_ioctl() From: Dan Carpenter <error27@xxxxxxxxx> If we return directly with -EPERM then lock_kernel() is still held. This was found with a code checker (http://repo.or.cz/w/smatch.git/). Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> Cc: <R.E.Wolff@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/char/sx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/char/sx.c~sxc-fix-missed-unlock_kernel-on-error-path-in-sx_fw_ioctl drivers/char/sx.c --- a/drivers/char/sx.c~sxc-fix-missed-unlock_kernel-on-error-path-in-sx_fw_ioctl +++ a/drivers/char/sx.c @@ -1747,7 +1747,8 @@ static long sx_fw_ioctl(struct file *fil break; case SXIO_DO_RAMTEST: if (sx_initialized) /* Already initialized: better not ramtest the board. */ - return -EPERM; + rc = -EPERM; + break; if (IS_SX_BOARD(board)) { rc = do_memtest(board, 0, 0x7000); if (!rc) _ Patches currently in -mm which might be from error27@xxxxxxxxx are origin.patch sxc-fix-missed-unlock_kernel-on-error-path-in-sx_fw_ioctl.patch sxc-fix-missed-unlock_kernel-on-error-path-in-sx_fw_ioctl-fix.patch linux-next.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