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

From: Paolo Abeni

Date: Tue Mar 17 2026 - 06:01:06 EST


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 <dqfext@xxxxxxxxx>

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