Re: [PATCH net-next v2] ppp: remove ppp->closing check
Paolo Abeni <[email protected]> Thu, 5 Feb 2026 12:40:15 +0100
| Newsgroups | org.kernel.vger.linux-ppp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 2/2/26 10:21 AM, Qingfang Deng wrote: > The ppp->closing flag is used to test if an interface is closing down. > However, when .ndo_uninit() is called (where ppp->closing is set to 1), > dev_close() has already brought down the interface, and > synchronize_net() guarantees that no pending TX/RX in the network path > can take place. Thus, the check in the network path is unnecessary. > > For file operations - ppp_read(), ppp_write(), and ppp_poll(), can > normally still send or receive skbs. ppp_read() and ppp_poll() are safe > because ppp_dev_uninit() sets pf->dead before waking them up, causing > both to exit cleanly. Please report the accurate call sequence that would lead to such syscall complete cleanly. Also what if ndo_uninit() happens just after the user-space has been woken-up? > ppp_write() does not check pf->dead, but > ppp_push() verifies that ppp->channels list is not empty before sending. > > Remove the ppp->closing check. This still feel risky to me and it's not clear which would be the goal/gain. It this change performance oriented? If so please included actual figures. Thanks, Paolo