Messages in this thread | | | Date | Mon, 7 Nov 2011 18:39:50 +0000 | From | Alan Cox <> | Subject | Re: PROBLEM: Race condition in tty buffer's function flush_to_ldisc(). |
| |
> Nested call flush_to_ldisc() happened on different CPU only. It happens because > one side pty call "schedule_work(&tty->buf.work)" on one CPU from "tty_flip_buffer_push()", > the other side call "schedule_work(&tty->buf.work)" from n_tty's layer from "n_tty_set_room()" > on different CPU. It also can happen in interrupt if interrupt handle on > different CPU. Schedule_work() schedule work on CPU which was called(IMHO).
But the two sides are different ttys so that specific case shouldn't matter.
Something is clearly happening because you trigger the trace but I don't see why the paths you indicate cause it ? If you make mthread a cpu struct variable and add a WARN_ON(1) in the error case do you get any useful traces ?
Alan
| |