Re: [PATCH net-next 2/2] ppp: remove pch->chan NULL checks from tx path

Paolo Abeni <[email protected]> Tue, 17 Mar 2026 10:57:38 +0100
Newsgroups org.kernel.vger.linux-ppp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On 3/12/26 10:37 AM, Qingfang Deng wrote:
> Now that ppp_disconnect_channel() is called before pch->chan is set to
> NULL, a channel from ppp->channels list on the transmit path is
> guaranteed to have non-NULL pch->chan.
> 
> Remove the pch->chan NULL checks from ppp_push(), ppp_mp_explode(), and
> ppp_fill_forward_path(), where a channel is obtained from the list.
> Remove the corresponding WRITE/READ_ONCE annotations as they no longer
> race.
> 
> Signed-off-by: Qingfang Deng <[email protected]>

Looks sane to me.

It looks like you are investing a significant amount of effort to
improve the ppp driver. I strongly suggest you to create some functional
self-tests before any other changes in this area.

The code is pretty intricate and obscure, a reasonable code coverage
could add significant confidence in non trivial changes, and could
possibly help revisiting/cleaning-up the locking schema (which is AFAICS
the most significant pain-point).

/P