]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ieee802154: Restore initial state on failed device_rename() in cfg802154_switch_netns()
authorIvan Abramov <i.abramov@mt-integration.ru>
Thu, 3 Apr 2025 10:19:32 +0000 (13:19 +0300)
committerStefan Schmidt <stefan@datenfreihafen.org>
Fri, 19 Jun 2026 19:40:53 +0000 (21:40 +0200)
commita2e06b4bef20b59446d5088e938c2be53cc4e6c6
treeecff236f1c6d024aff6e18add1ba2a087a937bf0
parentb85966adbf5de0668a815c6e3527f87e0c387fb4
ieee802154: Restore initial state on failed device_rename() in cfg802154_switch_netns()

Currently, the return value of device_rename() is not acted upon.

To avoid an inconsistent state in case of failure, roll back the changes
made before the device_rename() call.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 66e5c2672cd1 ("ieee802154: add netns support")
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
Link: https://lore.kernel.org/20250403101935.991385-2-i.abramov@mt-integration.ru
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
net/ieee802154/core.c