This is a note to let you know that I've just added the patch titled net: devlink: move netdev notifier block to dest namespace during reload to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-devlink-move-netdev-notifier-block-to-dest-namespace-during-reload.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 15feb56e30efea95992f5c572cee753db205eb7b Mon Sep 17 00:00:00 2001 From: Jiri Pirko <jiri@xxxxxxxxxx> Date: Tue, 8 Nov 2022 14:22:07 +0100 Subject: net: devlink: move netdev notifier block to dest namespace during reload From: Jiri Pirko <jiri@xxxxxxxxxx> commit 15feb56e30efea95992f5c572cee753db205eb7b upstream. The notifier block tracking netdev changes in devlink is registered during devlink_alloc() per-net, it is then unregistered in devlink_free(). When devlink moves from net namespace to another one, the notifier block needs to move along. Fix this by adding forgotten call to move the block. Reported-by: Ido Schimmel <idosch@xxxxxxxxxx> Fixes: 02a68a47eade ("net: devlink: track netdev with devlink_port assigned") Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx> Tested-by: Ido Schimmel <idosch@xxxxxxxxxx> Signed-off-by: Jiri Pirko <jiri@xxxxxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/devlink/leftover.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/net/devlink/leftover.c +++ b/net/devlink/leftover.c @@ -4507,8 +4507,11 @@ static int devlink_reload(struct devlink if (err) return err; - if (dest_net && !net_eq(dest_net, curr_net)) + if (dest_net && !net_eq(dest_net, curr_net)) { + move_netdevice_notifier_net(curr_net, dest_net, + &devlink->netdevice_nb); write_pnet(&devlink->_net, dest_net); + } err = devlink->ops->reload_up(devlink, action, limit, actions_performed, extack); devlink_reload_failed_set(devlink, !!err); Patches currently in stable-queue which might be from jiri@xxxxxxxxxx are queue-6.1/net-fix-ifname-in-netlink-ntf-during-netns-move.patch queue-6.1/net-devlink-convert-devlink-port-type-specific-point.patch queue-6.1/net-devlink-track-netdev-with-devlink_port-assigned.patch queue-6.1/net-devlink-move-port_type_netdev_checks-call-to-__d.patch queue-6.1/net-move-altnames-together-with-the-netdevice.patch queue-6.1/net-devlink-move-netdev-notifier-block-to-dest-namespace-during-reload.patch queue-6.1/bonding-return-pointer-to-data-after-pull-on-skb.patch queue-6.1/net-check-for-altname-conflicts-when-changing-netdev-s-netns.patch queue-6.1/net-devlink-move-port_type_warn_schedule-call-to-__d.patch queue-6.1/net-avoid-uaf-on-deleted-altname.patch queue-6.1/net-devlink-take-rtnl-in-port_fill-function-only-if-.patch