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