lkml.org 
[lkml]   [2009]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/5] usb_debug: implement multi urb write
Date
Am Mittwoch, 6. Mai 2009 04:00:01 schrieb Jason Wessel:

in static void usb_debug_write_bulk_callback(struct urb *urb)
> +       if (status) {
> +               dbg("nonzero write bulk status received: %d", status);
> +               return;
> +       }

[..]
> +       spin_lock_irqsave(&priv->tx_lock, flags);
> +       --priv->tx_outstanding_urbs;
> +       spin_unlock_irqrestore(&priv->tx_lock, flags);

That's a clear bug. If a URB finishes, you must decrease the counter, always
and without exception, even if status indicates an error.

Regards
Oliver

\
 
 \ /
  Last update: 2009-05-06 09:21    [W:0.071 / U:2.604 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site