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:	Mon,  5 Nov 2012 12:50:26 +0800
From:	Harvey Yang <harvey.huawei.yang@...il.com>
To:	Matt Mooney <mfm@...eddisk.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org,
	"harvey.yang" <harvey.huawei.yang@...il.com>
Subject: [PATCH 1/1] staging: usbip: remove an unnecessary lock in usbip_event_happened. The variable "happened" is local. So I think there is no need to lock here.

From: harvey.yang <harvey.huawei.yang@...il.com>


Signed-off-by: harvey.yang <harvey.huawei.yang@...il.com>
---
 drivers/staging/usbip/usbip_event.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c
index d332a34..668f8e0 100644
--- a/drivers/staging/usbip/usbip_event.c
+++ b/drivers/staging/usbip/usbip_event.c
@@ -116,10 +116,8 @@ int usbip_event_happened(struct usbip_device *ud)
 {
 	int happened = 0;
 
-	spin_lock(&ud->lock);
 	if (ud->event != 0)
 		happened = 1;
-	spin_unlock(&ud->lock);
 
 	return happened;
 }
-- 
1.7.1

--
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