Re: [Security] Should open TTY device files pin minor numbers?

From: H. Peter Anvin
Date: Wed Jul 29 2009 - 17:21:19 EST


On 07/24/2009 10:14 PM, Greg KH wrote:
> On Thu, Jul 23, 2009 at 02:38:01PM -0400, Alan Stern wrote:
>> Recent work in the TTY core and in usb-serial has caused a change
>> in behavior between 2.6.30 and 2.6.31-rc. Namely, if a USB serial
>> device is unplugged while a process holds the device file open, the
>> minor number won't get reused until the process closes the file.
>
> That's how the usb-serial code always worked, this is nothing new at
> all.
>
>> For example, if you run minicom over /dev/ttyUSB0, unplug the USB
>> device while minicom is running, and then plug it in again before
>> exiting minicom, it will reappear as /dev/ttyUSB1 instead of
>> /dev/ttyUSB0 (which will be gone).
>
> Exactly. People are used to this by now, it shouldn't be a supprise :)
>

It is, however, a *very* nasty surprise when the USB bus glitches.

-hpa
--
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/