Re: tty locking again :)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Gwe, 2005-11-04 at 18:03 +1100, Benjamin Herrenschmidt wrote:
> I noticed that there doesn't seem to be any kind of locking in
> tty_(un)register_driver. It can very easily race with tty_open() doing a
> get_tty_driver(). Shouldn't tty_(un)register_driver be changed to take
> the tty_sem at least while manipulating the list ?

Its totally racy. Its on the todo list but I'm waiting for the buffering
changes to get into the Linus kernel and tested before doing the next
chunk of work on it (firstly fixing the rx/tx locking, then removing
TTY_DONT_FLIP which is a precursor to sanity for polled serial devices
and DMA)

> I noticed that while chasing a different bug (a driver bug actually),
> but I don't see how we are protected here. And considering the race I
> found in the driver, I tend to think we aren't protected at all

It all needs considerable work. Fixing the receive/transmit locking is
IMHO by far the most important however now the buffers are done.

Alan

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux