Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99b5382b authored by Parav Pandit's avatar Parav Pandit Committed by Greg Kroah-Hartman
Browse files

devlink: Hold rtnl lock while reading netdev attributes



[ Upstream commit b187c9b4178b87954dbc94e78a7094715794714f ]

A netdevice of a devlink port can be moved to different net namespace
than its parent devlink instance.
This scenario occurs when devlink reload is not used.

When netdevice is undergoing migration to net namespace, its ifindex
and name may change.

In such use case, devlink port query may read stale netdev attributes.

Fix it by reading them under rtnl lock.

Fixes: bfcd3a46 ("Introduce devlink infrastructure")
Signed-off-by: default avatarParav Pandit <parav@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 42af416d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment