[PATCH V2] tty: fix data race between tty_init_dev and flush of buf
There can be a race, if receive_buf call comes before tty initialization completes in n_tty_open and tty->disc_data may be NULL. CPU0CPU1 000|n_tty_receive_buf_common() n_tty_open() -001|n_tty_receive_buf2()
[PATCH V2] tty: fix data race between tty_init_dev and flush of buf
There can be a race, if receive_buf call comes before tty initialization completes in n_tty_open and tty->disc_data may be NULL. CPU0CPU1 000|n_tty_receive_buf_common() n_tty_open() -001|n_tty_receive_buf2()