From: Greg KH <greg@kroah.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Wilco Beekhuizen <wilcobeekhuizen@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Missing usb_find_device symbol from usb.c
Date: Thu, 24 Jan 2008 09:20:49 -0800 [thread overview]
Message-ID: <20080124172049.GA9665@kroah.com> (raw)
In-Reply-To: <84144f020801240906l7e018a95wfd4ad7736851dd63@mail.gmail.com>
On Thu, Jan 24, 2008 at 07:06:39PM +0200, Pekka Enberg wrote:
> Hi Greg,
>
> On Jan 24, 2008 6:44 PM, Greg KH <greg@kroah.com> wrote:
> > No, that's not the problem. The code should just be using
> > usb_register_driver() and then doing what it needs to do in the probe()
> > callback, like any other USB driver.
> >
> > By calling usb_find_device() it allows more than one driver to talk to
> > the device at the same time, setting it up for some very bad things to
> > possibly happen to the device.
> >
> > So a simple code change should be all that is needed to properly fix
> > this.
> >
> > If you want, I can make up a patch, just point me at the version you
> > wish me to modify.
>
> As I already mentioned in private, the code is here:
>
> http://www.init0.nl/iriverfs-r0.1.0.1-linux-2.6.23.patch.bz2
>
> It's basically abusing the USB driver stack with a ->probe() function
> that returns -ENODEV and doing device discovery at mount time. That,
> however, is also broken as it assumes there's only one device plugged
> in (we're not passing any device identifier to sys_mount).
By returning -ENODEV, that still allows some other driver or user
through usbfs to come in and start talking to the device, while this
"driver" also touches it. Not nice.
> So it's not a simple code change at all.
Just create a root directory for every device that is seen in the
probe() function. That should be pretty simple to do.
thanks,
greg k-h
next prev parent reply other threads:[~2008-01-24 17:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 19:18 [PATCH] Missing usb_find_device symbol from usb.c Wilco Beekhuizen
2008-01-22 22:08 ` Adrian Bunk
2008-01-24 1:37 ` Greg KH
2008-01-24 10:05 ` Wilco Beekhuizen
2008-01-24 11:19 ` Pekka Enberg
2008-01-24 11:49 ` Oliver Neukum
2008-01-24 11:52 ` Pekka Enberg
2008-01-24 12:24 ` Oliver Neukum
2008-01-24 12:34 ` Pekka Enberg
2008-01-24 12:58 ` Oliver Neukum
2008-01-24 13:14 ` Pekka Enberg
2008-01-24 16:44 ` Greg KH
2008-01-24 17:06 ` Pekka Enberg
2008-01-24 17:20 ` Greg KH [this message]
2008-01-24 17:42 ` Pekka Enberg
2008-01-24 18:03 ` Greg KH
2008-01-24 19:25 ` Pekka J Enberg
2008-01-24 19:57 ` Oliver Neukum
2008-01-24 20:10 ` Pekka Enberg
2008-01-24 20:00 ` Oliver Neukum
2008-01-24 20:26 ` Pekka Enberg
2008-01-24 20:28 ` Greg KH
2008-01-25 8:58 ` Oliver Neukum
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=20080124172049.GA9665@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=wilcobeekhuizen@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.