[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200905060916.56384.oliver@neukum.org>
Date: Wed, 6 May 2009 09:16:56 +0200
From: Oliver Neukum <oliver@...kum.org>
To: Jason Wessel <jason.wessel@...driver.com>
Cc: greg@...ah.com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] usb_debug: implement multi urb write
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
Powered by blists - more mailing lists