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]
Date:	Sun, 8 Aug 2010 15:30:48 +0100
From:	Daniel J Blueman <daniel.blueman@...il.com>
To:	Roger Lucas <vt8231@...denengine.co.uk>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [2.6.35 patch] add missing unlock_kernel calls...

Hi Roger,

Here is a fix for 2.6.36-rc1:

Ensure the BKL is dropped along all paths.

Signed-off-by: Daniel J Blueman <daniel.blueman@...il.com>

diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index c24d2fa..53263e7 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -271,16 +271,18 @@ static int hiddev_open(struct inode *inode,
struct file *file)
 	lock_kernel();
 	i = iminor(inode) - HIDDEV_MINOR_BASE;

-	if (i >= HIDDEV_MINORS || i < 0 || !hiddev_table[i])
+	if (i >= HIDDEV_MINORS || i < 0 || !hiddev_table[i]) {
+		unlock_kernel();
 		return -ENODEV;
+	}

-	if (!(list = kzalloc(sizeof(struct hiddev_list), GFP_KERNEL)))
+	if (!(list = kzalloc(sizeof(struct hiddev_list), GFP_KERNEL))) {
+		unlock_kernel();
 		return -ENOMEM;
-	mutex_init(&list->thread_lock);
+	}

+	mutex_init(&list->thread_lock);
 	list->hiddev = hiddev_table[i];
-
-
 	file->private_data = list;

 	/*
-- 
Daniel J Blueman
--
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