Re: [HID] Fix hiddev devfs oops

From: Herbert Xu
Date: Tue Oct 12 2004 - 16:23:44 EST


On Mon, Oct 11, 2004 at 02:21:47PM -0300, Marcelo Tosatti wrote:
> On Tue, Oct 05, 2004 at 10:49:14PM +1000, Herbert Xu wrote:
> >
> > There is a long-standing devfs_unregister oops in hid/hiddev. It's
> > caused by hid calling hiddev_exit before unregistering itself which
> > in turn calls hiddev_disconnect.
> >
> > hiddev_exit removes the directory which contains the hiddev devices.
> > Therefore it needs to be called after the hiddev devices have been
> > disconnected.
> >
> > This patch fixes that.
> >
> > Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> >
> > Marcelo, the same fix is needed in 2.4 as well.
>
> Would be nice to have a version which applies to 2.4 also.

I did include a 2.4 patch in that email :)

Here it is again.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
===== drivers/usb/hid-core.c 1.30 vs edited =====
--- 1.30/drivers/usb/hid-core.c 2004-08-08 18:59:53 +10:00
+++ edited/drivers/usb/hid-core.c 2004-10-05 22:33:52 +10:00
@@ -1459,8 +1459,8 @@

static void __exit hid_exit(void)
{
- hiddev_exit();
usb_deregister(&hid_driver);
+ hiddev_exit();
}

module_init(hid_init);