net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()
authorJiri Pirko <jiri@nvidia.com>
Thu, 25 Aug 2022 11:29:23 +0000 (13:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Aug 2022 00:14:15 +0000 (17:14 -0700)
commit6005a8aecee8afeba826295321a612ab485c230e
tree33bee99ef7d0a8cde76e8d689e11bcfe60956ac4
parentde9d555cb8d4286a951b5b9bc824a12c739693ec
net: devlink: add RNLT lock assertion to devlink_compat_switch_id_get()

Similar to devlink_compat_phys_port_name_get(), make sure that
devlink_compat_switch_id_get() is called with RTNL lock held. Comment
already says so, so put this in code as well.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20220825112923.1359194-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/devlink.c