Re: [PATCH] [usb-serial] fix Ooops on uplug
From: Daniel Mack
Date: Tue Jul 21 2009 - 12:19:40 EST
On Tue, Jul 21, 2009 at 05:16:25PM +0100, Alan Cox wrote:
> > I got something similar with a pl2303 device, though not a crash. I
> > plugged in the device, opened /dev/ttyUSB0, unplugged the device, then
> > tried to read from the open file descriptor. The read provoked this:
>
> That looks like it occurs after the read, however that trace shows the
> close() method being called off sys_close() which in turn means a hang up
> didn't occur when it was unplugged.
It was, at least in my case. Did some printk debugging and it showed
that the hangup callback was entered what freed the serial device.
> > This is only a lockdep warning, and I don't understand its
> > significance. Even worse, when I plugged in a USB flash drive
> > afterward this appeared:
>
> Looks like something freed the resources but didn't hang up when the
> disconnect occurred
Probably the real fix would be to let the tty layer know the device died
from the hangup handler.
--
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/