Re: [PATCH net-next] net: devlink: remove redundant rtnl lock assert

2019-08-13 Thread Jakub Kicinski
On Mon, 12 Aug 2019 20:02:02 +0300, Vlad Buslov wrote: > 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 lo

[PATCH net-next] net: devlink: remove redundant rtnl lock assert

2019-08-12 Thread Vlad Buslov
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