> In tty layer, it use tty->ldisc_sem to proect tty_ldisc_ops.
> So I think tty->ldisc_sem can also protect tty->disc_data;
It might help by CC'ing TTY people, so that we could get this reviewed by
people who are familiar with TTY code.
Greg Kroah-Hartman (supporter:TTY LAYER)
Jiri Slaby (suppo
...@kernel.org
抄送: linux-...@vger.kernel.org; netdev@vger.kernel.org;
linux-ker...@vger.kernel.org; gaoyan (RD)
主题: [PATCH] net: remove disc_data_lock in ppp line discipline
In tty layer, it use tty->ldisc_sem to proect tty_ldisc_ops.
So I think tty->ldisc_sem can also protect tty->disc_
In tty layer, it use tty->ldisc_sem to proect tty_ldisc_ops.
So I think tty->ldisc_sem can also protect tty->disc_data;
For examlpe,
When cpu A is running ppp_synctty_ioctl that hold the tty->ldisc_sem,
at the same time if cpu B calls ppp_synctty_close, it will wait until
cpu A release tty->ldisc_
On Tue, 15 Dec 2020 23:00:54 +0800 Gao Yan wrote:
> tty layer provide tty->ldisc_sem lock to protect tty->disc_data;
> For examlpe, when cpu A is running ppp_synctty_ioctl that
> hold the tty->ldisc_sem, so if cpu B calls ppp_synctty_close,
> it will wait until cpu A release tty->ldisc_sem. So I th
tty layer provide tty->ldisc_sem lock to protect tty->disc_data;
For examlpe, when cpu A is running ppp_synctty_ioctl that
hold the tty->ldisc_sem, so if cpu B calls ppp_synctty_close,
it will wait until cpu A release tty->ldisc_sem. So I think it is
unnecessary to have the disc_data_lock;
cpu A