hotplug remove vs. device driver close
Don Fry
brazilnut at us.ibm.com
Fri Jun 4 06:02:27 EST 2004
> >
> > The pcnet32 driver tries to do the 'right thing' when it reads 0xffff,
> > but that does not include doing a 'close' prior to being removed. The
> > driver could keep some state around so that if its remove routine was
> > called without close first, it would cleanup, but I don't know of any
> > network driver that does this.
>
> What I get out of this thread is that pcnet32, and in fact, all drivers,
> should keep sufficient state around so that close() can be called either
> after or before remove().
>
Today in 2.6.6 if I try and do a rmmod pcnet32 and something is still using
the device, the rmmod will wait until the device is closed, and then it
goes away. If the unplug does the same thing, and doesn't complete until
the close occurs, then I would not expect to leak anything, or crash either.
> --linas
>
>
--
Don Fry
brazilnut at us.ibm.com
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list