Re: [PATCH] evdev: Release eventual input device grabs when gettingdisconnected

From: Dmitry Torokhov
Date: Mon Mar 31 2008 - 23:30:36 EST


On Mon, Mar 31, 2008 at 03:09:06PM -0700, Greg KH wrote:
> On Mon, Mar 31, 2008 at 04:57:36PM -0400, Dmitry Torokhov wrote:
> >
> > Ok, I really liked the old behavior better, but if it is to stay then
> > we need something like this (not for inclusion yet as mousedev and joydev
> > need to be adjusted as well):
>
> Yes, that's the proper behavior anyway, as you are passing off a pointer
> to a device, you need to keep the reference to that device around until
> you are finished with it.
>
> I'm amazed that this wasn't causing a problem before the kobject change,
> as this should have been needed there as well. Would running with slab
> debugging cause it to hit then?
>

It worked because evdev (and mousedev, joydev) are direct children of
input_dev and prior to Kay change parent would stay till all childrens
are gone.

I will ask Linus to pull extended patch covering also joydev and mousedev
shortly.

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/