From: Chandru Gopi <chandru.gopi.dev@gmail.com>
To: maoyixie.tju@gmail.com
Cc: alex.aring@gmail.com, linux-wpan@vger.kernel.org,
miquel.raynal@bootlin.com, netdev@vger.kernel.org,
stefan@datenfreihafen.org
Subject: Re: nl802154: GET_WPAN_PHY dump resolves NL802154_ATTR_IFINDEX in init_net
Date: Mon, 19 Oct 2026 15:13:22 +0000 [thread overview]
Message-ID: <20261019151322.8175-1-chandru.gopi.dev@gmail.com> (raw)
In-Reply-To: <20260920165057.3753458-1-maoyixie.tju@gmail.com>
On Mon, 21 Sep 2026 00:50:57 +0800, Maoyi Xie wrote:
> Does this look like a real bug? If it does, I am happy to send a patch,
> or to leave the fix to you.
Yes, I can reproduce it on v7.3-rc7 (58161ead29e5, Oct 16 2026) in
x86_64 QEMU with two mac802154_hwsim radios. The lookup at
net/ieee802154/nl802154.c:584 is unchanged, and I did not see a fix on
the list or in mainline as of today.
Setup: wpan0 on phy0 and wpan1 on phy1, both in init_net. phy1 is moved
into a fresh netns with "iwpan phy phy1 set netns <pid>". From inside
that netns I send NL802154_CMD_GET_WPAN_PHY dumps:
before after
no ifindex filter 1 phy 1 phy
ifindex of wpan1 (in this netns) ENODEV 1 phy
ifindex of wpan0 (only in init_net) empty dump ENODEV
"after" is with __dev_get_by_index(&init_net, ifidx) replaced by
__dev_get_by_index(sock_net(skb->sk), ifidx), as you suggested. Both
cases now return what you described, and the init_net baseline is
unchanged. No warnings were printed during the netns move.
I used a short static C program with raw generic netlink for this. I
am happy to turn it into a hwsim-based selftest, and can put it
wherever you think it belongs.
Are you still planning to send the fix? I can send it, with you as
Reported-by, or send the selftest alongside yours, whichever you
prefer.
Thanks,
Chandru
next prev parent reply other threads:[~2026-10-19 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 16:50 nl802154: GET_WPAN_PHY dump resolves NL802154_ATTR_IFINDEX in init_net Maoyi Xie
2026-10-19 15:13 ` Chandru Gopi [this message]
2026-10-20 6:54 ` Maoyi Xie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019151322.8175-1-chandru.gopi.dev@gmail.com \
--to=chandru.gopi.dev@gmail.com \
--cc=alex.aring@gmail.com \
--cc=linux-wpan@vger.kernel.org \
--cc=maoyixie.tju@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox