Re: PROBLEM: Race condition in tty buffer's function flush_to_ldisc().

From: Ilya Zykov
Date: Mon Nov 07 2011 - 09:52:36 EST


Alan Cox wrote:

>> Of course I know about tty_buffer_flush(), it only read TTY_FLUSHING,
>> it can't change TTY_FLUSHING, if flush_to_ldisc() single threaded,
>> we can change TTY_FLUSHING only in one place in one time(in
>> flush_to_ldisc()), therefor we can use only "set_bit(TTY_FLUSHING,
>> &tty->flags)" without test.
>
> Yes.. if you can pin down why in your testing you see the other case
> sometimes being true.
>
> Alan
>
>
>

OK, I try.
Ilya.
--
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/