Re: [PATCH 4/6] staging: usbip: Locking and logic fixes.

2012-10-22 Thread Bernard Blackham
On 22/10/2012, at 9:39 PM, Greg KH g...@kroah.com wrote: On Mon, Oct 22, 2012 at 06:45:36AM +1100, Bernard Blackham wrote: This patch cleans up much of the locking in usbip, as well as fixing some logic errors. In particular: - some spinlocks were taken with interrupts disabled in some

[PATCH 2/6] staging: usbip: Rename dum - vhci for consistency

2012-10-21 Thread Bernard Blackham
The name dum seems to be historical (copy/paste from dummy driver?). Rename that to vhci to be consistent with usage elsewhere in usbip. There are no functional changes here. Signed-off-by: Bernard Blackham b-linux...@largestprime.net --- drivers/staging/usbip/vhci_hcd.c | 82

[PATCH 0/6] staging: usbip: Bugfixes and cleanups

2012-10-21 Thread Bernard Blackham
This patch set fixes a number of crashes, deadlocks and resource leaks in usbip. It also makes some changes to improve style and consistency. Bernard Blackham (6): staging: usbip: Don't leak struct file. staging: usbip: Rename dum - vhci for consistency staging: usbip: Avoid superfluous set

[PATCH 3/6] staging: usbip: Avoid superfluous set HC_STATE_RUNNING in vhci_start

2012-10-21 Thread Bernard Blackham
HC_STATE_RUNNING is already set by the usb core. Signed-off-by: Bernard Blackham b-linux...@largestprime.net --- drivers/staging/usbip/vhci_hcd.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index b43fff9..b51e4ee

[PATCH 4/6] staging: usbip: Locking and logic fixes.

2012-10-21 Thread Bernard Blackham
idioms for unwinding on error. - usb_hcd_giveback_urb was called incorrectly when vhci_urb_enqueue returned an error. - vhci_device_unlink_cleanup did not properly clean up URBs which had not yet been transmitted yet. Signed-off-by: Bernard Blackham b-linux...@largestprime.net --- drivers

[PATCH 6/6] staging: usbip: Minor cleanups.

2012-10-21 Thread Bernard Blackham
Clean up some debug messages and comments. Signed-off-by: Bernard Blackham b-linux...@largestprime.net --- drivers/staging/usbip/usbip_event.c |2 +- drivers/staging/usbip/vhci_hcd.c| 23 ++- drivers/staging/usbip/vhci_rx.c | 12 ++-- 3 files changed

[PATCH] usbip: avoid deadlock in vhci_device_unlink_cleanup()

2012-09-06 Thread Bernard Blackham
is safe here). Signed-off-by: Bernard Blackham b-linux...@largestprime.net diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 12a9a5f..dfeb492 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -749,6 +749,7 @@ static void