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:	Thu, 11 Apr 2013 00:05:50 +0300 (EEST)
From:	Petko Manolov <petkan@...leusys.com>
To:	"David S. Miller" <davem@...emloft.net>
cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Sarah Sharp <sarah.a.sharp@...ux.intel.com>
Subject: [PATCH] net: usb: active URB submitted multiple times

From: Petko Manolov <petkan@...leusys.com>

Pegasus driver used single callback for sync and async control URBs. 
Special flags were employed to distinguish between both, but due to flawed 
logic it didn't always work.

Now [get|set]_registers() are much simpler.  Async write is also leaner 
and does not use single, statically allocated memory for usb_ctrlrequest, 
which is another potential race when asynchronously submitting control 
URBs.

The socket buffer pool in the receive path is removed.  It's existence 
didn't make much difference (performance-wise) and the code is better off 
without the spinlocks protecting it.

Largely duplicated code in routines reading and writing MII registers is 
now packed in __mi_op().

The rest of the patch is pretty much Lindent's fault.

Signed-off-by: Petko Manolov <petkan@...leusys.com>
---
drivers/net/usb/pegasus.c |  601 +++++++++++++++++++++++++++++++---------------------------------------------------------------------------
drivers/net/usb/pegasus.h |   10 +-
2 files changed, 177 insertions(+), 434 deletions(-)
View attachment "pegasus.h.diff" of type "TEXT/X-DIFF" (1246 bytes)

View attachment "pegasus.c.diff" of type "TEXT/X-DIFF" (37138 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ