Skip to content
Commit b187c9b4 authored by Parav Pandit's avatar Parav Pandit Committed by Jakub Kicinski
Browse files

devlink: Hold rtnl lock while reading netdev attributes



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>
parent 3cb2e6d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment