From: Oliver Neukum <oliver@neukum.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: linux-usb-devel@lists.sourceforge.net, greg@kroah.com,
linux-kernel@vger.kernel.org, vitalivanov@gmail.com,
netwiz@crc.id.au
Subject: Re: USB: FIx locks and urb->status in adutux
Date: Wed, 24 Oct 2007 16:04:42 +0200 [thread overview]
Message-ID: <200710241604.42832.oliver@neukum.org> (raw)
In-Reply-To: <20071023143852.df06530a.zaitcev@redhat.com>
Am Dienstag 23 Oktober 2007 schrieb Pete Zaitcev:
> On Tue, 23 Oct 2007 11:38:37 +0200, Oliver Neukum <oliver@neukum.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
next prev parent reply other threads:[~2007-10-24 14:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 3:34 USB: FIx locks and urb->status in adutux Pete Zaitcev
2007-10-23 9:38 ` [linux-usb-devel] " Oliver Neukum
2007-10-23 21:38 ` Pete Zaitcev
2007-10-24 14:04 ` Oliver Neukum [this message]
2007-10-24 1:53 ` Pete Zaitcev
2007-10-24 14:09 ` Vitaliy Ivanov
2007-10-25 3:20 ` Pete Zaitcev
2007-10-25 3:25 ` Pete Zaitcev
[not found] ` <200710251403.48688.oliver@neukum.org>
2007-10-25 16:38 ` Pete Zaitcev
2007-10-29 18:04 ` Vitaliy Ivanov
2007-10-30 4:24 ` Pete Zaitcev
2007-10-30 13:09 ` Vitaliy Ivanov
2007-10-30 21:54 ` Pete Zaitcev
2007-10-31 11:54 ` Vitaliy Ivanov
2007-10-31 22:01 ` Pete Zaitcev
2007-11-01 9:06 ` Vitaliy Ivanov
2007-11-01 17:28 ` Pete Zaitcev
2007-10-24 14:49 ` Oliver Neukum
2007-10-24 21:25 ` Greg KH
2007-10-26 9:57 ` Vitaliy Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710241604.42832.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=netwiz@crc.id.au \
--cc=vitalivanov@gmail.com \
--cc=zaitcev@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox