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

[PATCH 1/6] staging: usbip: Don't leak struct file.

2012-10-21 Thread Bernard Blackham
Signed-off-by: Bernard Blackham --- drivers/staging/usbip/stub_dev.c |3 ++- drivers/staging/usbip/usbip_common.c |4 +++- drivers/staging/usbip/vhci_hcd.c | 10 +++--- drivers/staging/usbip/vhci_sysfs.c |6 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff

[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 --- drivers/staging/usbip/vhci_hcd.c

[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 --- drivers/staging/usbip/usbip_event.c |2 +- drivers/staging/usbip/vhci_hcd.c| 23 ++- drivers/staging/usbip/vhci_rx.c | 12 ++-- 3 files changed, 17 insertions(+), 20

[PATCH 5/6] staging: usbip: Simplify list logic in vhci_tx.c.

2012-10-21 Thread Bernard Blackham
We don't need to iterate over a list just to pull off the head. Signed-off-by: Bernard Blackham --- drivers/staging/usbip/vhci_tx.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/usbip/vhci_tx.c b/drivers/staging/usbip/vhci_tx.c

[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 --- 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 100644 --- a/drivers/staging

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

[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 --- drivers/staging/usbip/vhci_hcd.c | 82 +++

[PATCH] usbip: avoid deadlock in vhci_device_unlink_cleanup()

2012-09-06 Thread Bernard Blackham
for_each_entry_safe is safe here). Signed-off-by: Bernard Blackham 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 vhci_de