]> git.baikalelectronics.ru Git - kernel.git/commit
net: core: devlink.c: Hold devlink->lock from the beginning of devlink_dpipe_table_re...
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Sun, 23 Feb 2020 11:22:33 +0000 (16:52 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 05:17:37 +0000 (21:17 -0800)
commitbd68ccb0277f17f472799b2762315c934d004c58
treede670a61e2f8420d78f2fcfd0b61ecec0776fcba
parentd8ae1ca1943af8ffcb6102f47b33339b4a38c029
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: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c