Skip to content
Commit 6132c1d9 authored by Madhuparna Bhowmik's avatar Madhuparna Bhowmik Committed by David S. Miller
Browse files

net: core: devlink.c: Hold devlink->lock from the beginning of devlink_dpipe_table_register()



devlink_dpipe_table_find() should be called under either
rcu_read_lock() or devlink->lock. devlink_dpipe_table_register()
calls devlink_dpipe_table_find() without holding the lock
and acquires it later. Therefore hold the devlink->lock
from the beginning of devlink_dpipe_table_register().

Suggested-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 503ba7c6
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