From: Greg KH <gregkh@suse.de>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Phil Turmel <philip@turmel.org>, Mat <jackdachef@gmail.com>,
Guillaume Chazarain <guichaz@gmail.com>,
linux-kernel@vger.kernel.org, Oliver Neukum <oliver@neukum.org>,
Alan Ott <alan@signal11.us>,
linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
Andreas Bombe <aeb@debian.org>, Alex Riesen <raa.lkml@gmail.com>,
Gabriel C <nix.or.die@googlemail.com>
Subject: Re: [BUG, Regression, bisected] USB mouse causes bug on 1st insert, ignored on 2nd insert, lsusb stuck at usbdev_open
Date: Tue, 21 Sep 2010 10:07:28 -0700 [thread overview]
Message-ID: <20100921170728.GA10105@suse.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1009211852010.26813@pobox.suse.cz>
On Tue, Sep 21, 2010 at 06:55:36PM +0200, Jiri Kosina wrote:
> On Tue, 21 Sep 2010, Greg KH wrote:
>
> > > > I have just found out that it's actually CONFIG_USB_DYNAMIC_MINORS which
> > > > makes the difference. When unset, the problem doesn't trigger, and
> > > > usb_find_interface() always returns the proper interface. When
> > > > CONFIG_USB_DYNAMIC_MINORS is being used, the oops happen.
> > > >
> > > > I'll look into that.
> > >
> > > Apparently the problem is that intf->minors doesn't get initialized
> > > properly. This patch should fix it. Everybody, please try it out.
> >
> > Wow, what happened to suddenly cause this? Nothing has changed here in
> > a long time.
> >
> > wierd.
>
> It doesn't hit you if you are calling usb_register_dev() for all the
> instances you have, as the first device will have minor '0', the second
> one '1', etc.
>
> But if you are calling usb_find_interface() for devices that have never
> been registered through usb_register_dev(), then you have a problem, as
> usb_find_interface() will match those unregistered devices (as minor == 0
> in such cases).
>
> This is probably quite rare scenario, and hiddev (which might be the only
> in-kernel driver doing this?) has moved to usb_find_interface() only
> recently.
Ah, ok, that makes sense, I never thought of someone calling that
function if they had never registered a device :)
When did hiddev make this change? We need to know that for the -stable
backport of this patch.
Alan, care to resend the patch in a format I can apply it?
thanks,
greg k-h
next prev parent reply other threads:[~2010-09-21 17:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 1:33 [BUG, Regression, bisected] USB mouse causes bug on 1st insert, ignored on 2nd insert, lsusb stuck at usbdev_open Phil Turmel
2010-09-20 9:43 ` Guillaume Chazarain
2010-09-20 10:47 ` Phil Turmel
2010-09-20 12:42 ` Jiri Kosina
2010-09-20 13:19 ` Phil Turmel
2010-09-20 13:25 ` Jiri Kosina
2010-09-20 13:56 ` Mat
2010-09-20 15:10 ` Jiri Kosina
2010-09-20 17:05 ` Mat
2010-09-20 17:40 ` Phil Turmel
2010-09-21 12:31 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1009211156520.26813-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2010-09-21 13:57 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1009211556200.26813-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2010-09-21 14:48 ` Heinz Diehl
2010-09-21 14:55 ` Jiri Kosina
2010-09-21 14:30 ` Alan Stern
2010-09-21 14:40 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1009211638450.26813-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2010-09-21 14:42 ` Phil Turmel
2010-09-21 14:54 ` Phil Turmel
[not found] ` <4C98C70B.3080407-xiX+HWoRdKcdnm+yROfE0A@public.gmane.org>
2010-09-21 16:08 ` Gabriel C
2010-09-22 9:47 ` Mat
[not found] ` <AANLkTinQVNy4yOSW=aEbuYh6b_F8nKBLxsjxBDk8zq8O-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-24 16:46 ` Greg KH
2010-09-21 16:50 ` Greg KH
[not found] ` <20100921165048.GB8756-l3A5Bk7waGM@public.gmane.org>
2010-09-21 16:55 ` Jiri Kosina
2010-09-21 17:07 ` Greg KH [this message]
2010-09-21 17:14 ` Jiri Kosina
2010-09-20 20:55 ` Alan Stern
2010-09-20 22:48 ` Jiri Kosina
2010-09-21 0:41 ` Andreas Bombe
2010-09-20 14:11 ` Phil Turmel
[not found] ` <4C96B9DB.8030403-xiX+HWoRdKcdnm+yROfE0A@public.gmane.org>
2010-09-20 19:35 ` Maciej Rutecki
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=20100921170728.GA10105@suse.de \
--to=gregkh@suse.de \
--cc=aeb@debian.org \
--cc=alan@signal11.us \
--cc=guichaz@gmail.com \
--cc=jackdachef@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nix.or.die@googlemail.com \
--cc=oliver@neukum.org \
--cc=philip@turmel.org \
--cc=raa.lkml@gmail.com \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).