]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
devlink: Make sure devlink instance and port are in same net namespace
authorParav Pandit <parav@nvidia.com>
Wed, 25 Nov 2020 09:16:20 +0000 (11:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:41:59 +0000 (10:41 +0100)
commitd2d2a882000c6de3a106a0932a33b2b56d405b6c
treed514d020fa682de17a9dac8b6943163544018a37
parent9670490edfc442d0287726a28ec7dd5f2cab0969
devlink: Make sure devlink instance and port are in same net namespace

[ Upstream commit a7b43649507dae4e55ff0087cad4e4dd1c6d5b99 ]

When devlink reload operation is not used, netdev of an Ethernet port may
be present in different net namespace than the net namespace of the
devlink instance.

Ensure that both the devlink instance and devlink port netdev are located
in same net namespace.

Fixes: 070c63f20f6c ("net: devlink: allow to change namespaces during reload")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/devlink.c