lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0902030829580.31813@bikeee>
Date:	Tue, 3 Feb 2009 11:14:21 +0300 (EAT)
From:	Dan Carpenter <error27@...il.com>
To:	R.E.Wolff@...Wizard.nl
cc:	linux-kernel@...r.kernel.org
Subject: [patch] unlock_kernel() on error path in sx_fw_ioctl()

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/). 
Compile tested only, sorry.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@...il.com>

--- orig/drivers/char/sx.c	2009-02-03 08:27:59.000000000 +0300
+++ devel/drivers/char/sx.c	2009-02-03 08:28:31.000000000 +0300
@@ -1747,7 +1747,8 @@
  		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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ