]> git.baikalelectronics.ru Git - kernel.git/commit
net: devlink: remove redundant rtnl lock assert
authorVlad Buslov <vladbu@mellanox.com>
Mon, 12 Aug 2019 17:02:02 +0000 (20:02 +0300)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 13 Aug 2019 23:47:11 +0000 (16:47 -0700)
commit0686cc1fb4b156d0a5456e6501cb74d62522670d
treecf3c3170c5569b88db9325521d523020c53f5790
parent419af368adf1a8fc8b820e00501ea318eb53b10e
net: devlink: remove redundant rtnl lock assert

It is enough for caller of devlink_compat_switch_id_get() to hold the net
device to guarantee that devlink port is not destroyed concurrently. Remove
rtnl lock assertion and modify comment to warn user that they must hold
either rtnl lock or reference to net device. This is necessary to
accommodate future implementation of rtnl-unlocked TC offloads driver
callbacks.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
net/core/devlink.c