Re: [PATCH][v3] tty: fix race between flush_to_ldisc and tty_open

2019-01-18 Thread Greg KH
On Fri, Jan 18, 2019 at 04:56:04PM +0800, Li RongQing wrote: > There still is a race window after the commit b027e2298bd588 > ("tty: fix data race between tty_init_dev and flush of buf"), > and we encountered this crash issue if receive_buf call comes > before tty initialization completes in n_tty_

[PATCH][v3] tty: fix race between flush_to_ldisc and tty_open

2019-01-18 Thread Li RongQing
There still is a race window after the commit b027e2298bd588 ("tty: fix data race between tty_init_dev and flush of buf"), and we encountered this crash issue if receive_buf call comes before tty initialization completes in n_tty_open and tty->driver_data may be NULL. CPU0