Re: [PATCH] [v2]net:ppp: remove disc_data_lock in ppp line discipline

2021-01-04 Thread Gaoyan
Hi Greg KH: On Fri, 1 Jan 2021 09:18:48 +0100, Greg KH wrote: >On Fri, Jan 01, 2021 at 11:37:18AM +0800, Gao Yan wrote: >> In tty layer, it provides tty->ldisc_sem to protect all tty_ldisc_ops >> including ppp_sync_ldisc. So I think tty->ldisc_sem can also protect >> tty->disc_data, and the disc_d

Re: [PATCH] [v2]net:ppp: remove disc_data_lock in ppp line discipline

2021-01-01 Thread Gaoyan
Hi Greg KH: We have a potential race on dereferencing tty->disc_data, so we should use some locks to avoid the competition. In the current version, it defines disc_data_lock to protect the race of ppp_asynctty_receive and ppp_asynctty_close. However, I think when cpu A is running ppp_asynctty_re

答复: [PATCH] net: remove disc_data_lock in ppp line discipline

2020-12-31 Thread Gaoyan
Dear all: Could I get your comments for the updates? If I can get a reply, it will help me a lot . Thanks https://lkml.org/lkml/2020/12/28/19 *** Original mail - 发件人: gaoyan (RD) 发送时间: 2020年12月28日 15:16 收件人: pau...@samba.org; da...@davemloft.net; k

答复: [PATCH] [v2] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer

2020-12-11 Thread Gaoyan
...@linuxfoundation.org] 发送时间: 2020年12月10日 14:22 收件人: gaoyan (RD) 抄送: jirisl...@kernel.org; linux-kernel@vger.kernel.org; tianxianting (RD) 主题: Re: [PATCH] [v2] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer On Thu, Dec 10, 2020 at 10:25:07AM +0800, Yan.Gao wrote: > n_tty_flush_buffer can hap

答复: [PATCH] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer

2020-12-09 Thread Gaoyan
...@linuxfoundation.org] 发送时间: 2020年12月9日 22:38 收件人: gaoyan (RD) 抄送: jirisl...@kernel.org; linux-kernel@vger.kernel.org; tianxianting (RD) 主题: Re: [PATCH] tty: Protect disc_data in n_tty_close and n_tty_flush_buffer On Wed, Dec 09, 2020 at 05:59:21PM +0800, Yan.Gao wrote: > n_tty_flush_buffer can happen