Re: [PATCH net-next v9 04/11] ieee802154: 6lowpan: Validate link netns in newlink() of rtnl_link_ops

Kuniyuki Iwashima <[email protected]>
Newsgroups org.kernel.vger.linux-ppp,dev.linux.lists.bridge,org.kernel.vger.bpf,org.kernel.vger.linux-can,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-rdma,org.kernel.vger.linux-wireless,org.kernel.vger.linux-wpan,org.kernel.vger.netdev,org.open-mesh.lists.batman
Message-ID <[email protected]>
From: Xiao Liang <[email protected]>
Date: Mon, 10 Feb 2025 21:29:55 +0800
> Device denoted by IFLA_LINK is in link_net (IFLA_LINK_NETNSID) or
> source netns by design, but 6lowpan uses dev_net.
> 
> Note dev->netns_local is set to true and currently link_net is
> implemented via a netns change. These together effectively reject
> IFLA_LINK_NETNSID.
> 
> This patch adds a validation to ensure link_net is either NULL or
> identical to dev_net. Thus it would be fine to continue using dev_net
> when rtnetlink core begins to create devices directly in target netns.
> 
> Signed-off-by: Xiao Liang <[email protected]>

Reviewed-by: Kuniyuki Iwashima <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.