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>] [day] [month] [year] [list]
Date:	Sat, 29 Dec 2007 09:20:21 +0800
From:	Dave Young <hidave.darkstar@...il.com>
To:	gregkh@...e.de
Cc:	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: [PATCH 12/12] usb : Use mutex instead of semaphore in driver core

Signed-off-by: Dave Young <hidave.darkstar@...il.com> 

---
include/linux/usb.h |    6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff -upr linux/include/linux/usb.h linux.new/include/linux/usb.h
--- linux/include/linux/usb.h	2007-12-28 10:50:31.000000000 +0800
+++ linux.new/include/linux/usb.h	2007-12-28 10:52:31.000000000 +0800
@@ -441,9 +441,9 @@ extern struct usb_device *usb_get_dev(st
 extern void usb_put_dev(struct usb_device *dev);
 
 /* USB device locking */
-#define usb_lock_device(udev)		down(&(udev)->dev.sem)
-#define usb_unlock_device(udev)		up(&(udev)->dev.sem)
-#define usb_trylock_device(udev)	down_trylock(&(udev)->dev.sem)
+#define usb_lock_device(udev)		mutex_lock(&(udev)->dev.mutex)
+#define usb_unlock_device(udev)		mutex_unlock(&(udev)->dev.mutex)
+#define usb_trylock_device(udev)	mutex_trylock(&(udev)->dev.mutex)
 extern int usb_lock_device_for_reset(struct usb_device *udev,
 				     const struct usb_interface *iface);
 
--
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