Re: [PATCH RESEND v1] vxcan: Support per-netns device unregistration.

Kuniyuki Iwashima <[email protected]> Sat, 1 Aug 2026 01:33:33 +0200
Newsgroups org.kernel.vger.linux-can,dev.linux.lists.sashiko-reviews
Message-ID <CAAVpQUD31xYKAx6NKdbqGKCLzk2ckB8Fb5tLySK7dBO_jvg4dg@mail.gmail.com>
On Fri, Jul 31, 2026 at 4:31=E2=80=AFPM <[email protected]> wrote:
>
> Thank you for your contribution! Sashiko AI review found 1 potential issu=
e(s) to consider:
> - [Low] The patch calls a non-existent function `unregister_netdevice_que=
ue_net()`, causing a build failure.

Hmm.. weird.  I saw can-next has this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/comm=
it/?id=3D71ac90cca6d8e6fcdd674a50157181ef4ac441a0


> --
>
> --- Patch [1]: [PATCH RESEND v1] vxcan: Support per-netns device unregist=
ration. ---
> commit aa743c4ffeab7ce1e07d36aa7e401187541f6f4f
> Author: Kuniyuki Iwashima <[email protected]>
>
> vxcan: Support per-netns device unregistration.
>
> This commit modifies vxcan_dellink() to support concurrent per-netns devi=
ce
> unregistration by using xchg() to ensure each device is queued for
> destruction only once. It drops the synchronous RTNL assumption for delet=
ing
> both the local and peer devices.
>
> > diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c
> > index e882250180ef6..b7efed1226d88 100644
> > --- a/drivers/net/can/vxcan.c
> > +++ b/drivers/net/can/vxcan.c
> [ ... ]
> > @@ -281,24 +284,25 @@ static int vxcan_newlink(struct net_device *dev,
> >
> >  static void vxcan_dellink(struct net_device *dev, struct list_head *he=
ad)
> >  {
> [ ... ]
> > -     if (peer) {
> > -             priv =3D netdev_priv(peer);
> > -             RCU_INIT_POINTER(priv->peer, NULL);
> > -             unregister_netdevice_queue(peer, head);
> > -     }
> > +     priv =3D netdev_priv(peer);
> > +     dev =3D unrcu_pointer(xchg(&priv->peer, NULL));
> > +     if (dev)
> > +             unregister_netdevice_queue_net(dev_net(dev), peer, head);
>
> [Severity: Low]
> Does unregister_netdevice_queue_net() exist in the source tree? It appear=
s
> this will cause a build failure due to an undefined function reference wh=
en
> the driver is compiled.
>
> > +
> > +     netdev_put(peer, peer_tracker);
> > +     netdev_put(dev, &priv->peer_tracker);
> >  }
>
> --
> Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260731231755.24=
[email protected]?part=3D1