From: Greg KH <greg@kroah.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Jiri Slaby <jirislaby@gmail.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>,
USB development list <linux-usb-devel@lists.sourceforge.net>
Subject: Re: rmmod uhci_hcd -> BUG: atomic counter underflow
Date: Mon, 12 Mar 2007 14:41:49 -0700 [thread overview]
Message-ID: <20070312214149.GA5950@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0703121715490.2480-100000@iolanthe.rowland.org>
On Mon, Mar 12, 2007 at 05:25:09PM -0400, Alan Stern wrote:
> On Mon, 12 Mar 2007, Jiri Slaby wrote:
>
> > Jiri Slaby napsal(a):
> > > Alan Stern napsal(a):
> > >> On Mon, 12 Mar 2007, Jiri Slaby wrote:
> > >>> After rmmoding of uhci_hcd on fresh booted 2.6.21-rc3-mm2 I got this:
> > >>>
> > >>> BUG: atomic counter underflow at:
> > > [...]
> > >>> [<c01db754>] kobject_put+0x14/0x16
> > >>> [<c01db8a3>] kobject_unregister+0x22/0x25
> > >>> [<c024c987>] bus_remove_driver+0x75/0x82
> > >>> [<c024d3b8>] driver_unregister+0xb/0x18
> > >>> [<c01e7020>] pci_unregister_driver+0x13/0x73
> > >>> [<f88dbbd9>] uhci_hcd_cleanup+0xd/0x2d [uhci_hcd]
> > > [...]
> > >> Would it be possible for you to add the atomic counter underflow check
> > >> to 2.6.21-rc3 and see if the problem still occurs? If it doesn't,
> > >> that's a good indication the USB stack isn't guilty -- the bus
> > >> registration code hasn't changed for several kernel releases.
> > >
> > > Yes.
> >
> > I can confirm, that this issue went upstream and is currently present there.
>
> I found the problem, but I don't know how to fix it. Hopefully Greg or
> Rusty will know.
>
> There are two bugs in kernel/module.c:module_remove_driver(), right at the
> end of the routine:
>
> /*
> * Undo the additional reference we added in module_add_driver()
> * via kset_find_obj()
> */
> if (drv->mod_name)
> kobject_put(&drv->kobj);
>
This code is reverted in 2.6.21-rc3-git7 as it was incorrect as you have
properly determined.
So, can people please test with a kernel newer than that?
thanks,
greg k-h
next prev parent reply other threads:[~2007-03-12 21:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-12 16:10 rmmod uhci_hcd -> BUG: atomic counter underflow Jiri Slaby
2007-03-12 16:26 ` Alan Stern
2007-03-12 16:29 ` Jiri Slaby
2007-03-12 16:50 ` Jiri Slaby
2007-03-12 21:25 ` Alan Stern
2007-03-12 21:41 ` Greg KH [this message]
2007-03-12 22:22 ` Jiri Slaby
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=20070312214149.GA5950@kroah.com \
--to=greg@kroah.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=rusty@rustcorp.com.au \
--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