Re: [PATCH net] drivers/net/wan/x25_asy: Keep the ldisc running even when netif is down

2020-09-28 Thread Xie He
On Mon, Sep 28, 2020 at 3:58 PM David Miller wrote: > > It could also go back down and also back up again after you do this > test. Maybe even 10 or 100 times over. > > You can't just leave things so incredibly racy like this, please apply > proper synchronization between netdev state changes and

Re: [PATCH net] drivers/net/wan/x25_asy: Keep the ldisc running even when netif is down

2020-09-28 Thread David Miller
From: Xie He Date: Sat, 26 Sep 2020 13:56:10 -0700 > @@ -265,7 +269,9 @@ static void x25_asy_write_wakeup(struct tty_struct *tty) >* transmission of another packet */ > sl->dev->stats.tx_packets++; > clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); > -

[PATCH net] drivers/net/wan/x25_asy: Keep the ldisc running even when netif is down

2020-09-26 Thread Xie He
I believe it is necessary to keep the N_X25 line discipline running even when the upper network interface is down, because otherwise, the last frame transmitted before the interface going down may be incompletely transmitted, and the first frame received after the interface going up may be incomple