[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200710241604.42832.oliver@neukum.org>
Date: Wed, 24 Oct 2007 16:04:42 +0200
From: Oliver Neukum <oliver@...kum.org>
To: Pete Zaitcev <zaitcev@...hat.com>
Cc: linux-usb-devel@...ts.sourceforge.net, greg@...ah.com,
linux-kernel@...r.kernel.org, vitalivanov@...il.com,
netwiz@....id.au
Subject: Re: USB: FIx locks and urb->status in adutux
Am Dienstag 23 Oktober 2007 schrieb Pete Zaitcev:
> On Tue, 23 Oct 2007 11:38:37 +0200, Oliver Neukum <oliver@...kum.org> wrote:
>
> > > + /* XXX Anchor these instead */
> > > + spin_lock_irqsave(&dev->buflock, flags);
> > > + if (!dev->read_urb_finished) {
> > > + spin_unlock_irqrestore(&dev->buflock, flags);
> > > + usb_kill_urb(dev->interrupt_in_urb);
> > > + } else
> > > + spin_unlock_irqrestore(&dev->buflock, flags);
>
> > Why bother? Simply call usb_kill_urb() unconditionally.
>
> Is it always safe to kill unfilled URBs? The filled but unsubmitted ones
> are ok, but in this case it's possible that we only allocated something
> but never submitted. Our current implementation happens to be safe by
> virtue of ->dev being NULL in such case. I do not remember if we always
> guaranteed that and since Vitaly is going to take this code for a
> backport, I decided to play it safe.
I am not sure as far as 2.4 is concerned. In fact I am not sure 2.4 has
usb_kill_urb() at all.
Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists