From: Oliver Neukum <oliver@neukum.org>
To: Max Krasnyansky <maxk@qualcomm.com>, Greg KH <greg@kroah.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-usb-devel@lists.sourceforge.net
Subject: Re: [Bluetooth] HCI USB driver update. Support for SCO over HCI USB.
Date: Wed, 30 Apr 2003 09:06:25 +0200 [thread overview]
Message-ID: <200304300906.25490.oliver@neukum.org> (raw)
In-Reply-To: <5.1.0.14.2.20030429152151.10dc8db0@unixmail.qualcomm.com>
Am Mittwoch, 30. April 2003 02:44 schrieb Max Krasnyansky:
> At 02:40 PM 4/29/2003, Greg KH wrote:
> >On Tue, Apr 29, 2003 at 11:34:19PM +0200, Oliver Neukum wrote:
> >> > +int usb_init_urb(struct urb *urb)
> >> > +{
> >> > + if (!urb)
> >> > + return -EINVAL;
> >> > + memset(urb, 0, sizeof(*urb));
> >> > + urb->count = (atomic_t)ATOMIC_INIT(1);
> >> > + spin_lock_init(&urb->lock);
> >> > +
> >> > + return 0;
> >> > +}
> >>
> >> Greg, please don't do it this way. Somebody will
> >> try to free this urb. If the urb is part of a structure
> >> this must not lead to a kfree. Please init it to some
> >> insanely high dummy value in this case.
>
> Uh, I didn't think about that one. This stuff was first implemented
> for 2.4 which didn't have refcount in urb and then forward ported to 2.5.
It should work. However if you have a refcount bug, the failure case will
be spectacular.
Regards
Oliver
next prev parent reply other threads:[~2003-04-30 6:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200304290317.h3T3HOdA027579@hera.kernel.org>
2003-04-29 4:15 ` [Bluetooth] HCI USB driver update. Support for SCO over HCI USB Greg KH
2003-04-29 20:29 ` Max Krasnyansky
2003-04-29 21:15 ` Greg KH
2003-04-29 21:34 ` Oliver Neukum
2003-04-29 21:40 ` Greg KH
2003-04-29 22:24 ` [linux-usb-devel] " Oliver Neukum
2003-04-30 0:44 ` Max Krasnyansky
2003-04-30 7:06 ` Oliver Neukum [this message]
2003-04-29 21:55 ` Max Krasnyansky
2003-04-29 22:04 ` Greg KH
2003-04-29 21:39 ` [linux-usb-devel] " David Brownell
2003-04-29 21:37 ` Greg KH
2003-04-29 22:04 ` Max Krasnyansky
2003-04-30 4:55 ` David Brownell
2003-05-08 22:55 ` Max Krasnyansky
2003-05-09 19:06 ` David Brownell
2003-05-09 19:29 ` Greg KH
2003-05-09 22:35 ` Max Krasnyansky
2003-05-09 22:35 ` Max Krasnyansky
2003-05-09 23:05 ` Greg KH
2003-05-10 0:48 ` David Brownell
2003-05-10 5:06 ` Brad Hards
2003-05-10 5:40 ` Greg KH
2003-05-10 5:55 ` William Lee Irwin III
2003-05-10 6:11 ` Greg KH
2003-05-10 6:14 ` William Lee Irwin III
2003-05-12 17:53 ` Max Krasnyansky
2003-05-12 18:01 ` Greg KH
2003-05-12 18:55 ` Max Krasnyansky
2003-05-12 20:23 ` David Brownell
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=200304300906.25490.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=maxk@qualcomm.com \
--cc=oliver@neukum.name \
/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