Hi,
On 2026/11/30 18:16, Nicolas Dichtel wrote:
> diff --git a/drivers/net/ppp/pppox.c b/drivers/net/ppp/pppox.c
> index a6f72c813bef..392320d01abf 100644
> --- a/drivers/net/ppp/pppox.c
> +++ b/drivers/net/ppp/pppox.c
> @@ -74,7 +74,6 @@ int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
> switch (cmd) {
> case PPPIOCGCHAN: {
> - struct sk_buff *skb;
> int index;
> rc = -ENOTCONN;
> @@ -92,17 +91,10 @@ int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
> * /dev/ppp.
> */
> sk->sk_state |= PPPOX_BOUND;
> - /* Let lockless receive paths finish queueing against the old
> - * state.
> + /* A bound socket is no longer readable: drop the packets
> + * queued before the handoff.
> */
> - synchronize_net();
> - /* Drain packets queued before the handoff because a bound
> - * socket is no longer readable.
> - */
> - while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
> - skb_orphan(skb);
> - ppp_input(&po->chan, skb);
> - }
> + skb_queue_purge(&sk->sk_receive_queue);
pppoe_rcv() runs concurrently and may have observed the old state, and can queue more packets to this queue after the purge, which was the reason for the synchronize_net().
Therefore a non-blocking call_rcu() is still required.