From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Andrey Misiurov <amisiurov@cloudlinux.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] ieee802154: keep the original error after a netns rollback
Date: Fri, 20 Nov 2026 09:25:45 +0100 [thread overview]
Message-ID: <87tslbc3jq.fsf@bootlin.com> (raw)
In-Reply-To: <20261120065750.3274661-1-amisiurov@cloudlinux.com> (Andrey Misiurov's message of "Fri, 20 Nov 2026 07:57:49 +0100")
On 20/11/2026 at 07:57:49 +01, Andrey Misiurov <amisiurov@cloudlinux.com> wrote:
> cfg802154_switch_netns() moves all of a phy's netdevs into a new netns. If
> one move fails, it jumps to the errout label and moves the already-moved
> netdevs back to the old netns.
>
> That rollback loop overwrites the same 'err' variable with the result of
> each move-back. The move-backs succeed, so 'err' ends up 0 and the function
> returns 0 -- success -- even though nothing moved and the phy stayed in the
> old netns. nl802154_wpan_phy_netns() then tells userspace the move worked.
>
> Give the rollback loop its own 'err' so the original error survives and is
> returned.
>
> Fixes: 66e5c2672cd1 ("ieee802154: add netns support")
> Signed-off-by: Andrey Misiurov <amisiurov@cloudlinux.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
prev parent reply other threads:[~2026-11-20 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 6:57 [PATCH net v2] ieee802154: keep the original error after a netns rollback Andrey Misiurov
2026-11-20 8:25 ` Miquel Raynal [this message]
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=87tslbc3jq.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=amisiurov@cloudlinux.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.