]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: replace port_list_lock with devlink instance lock
authorJakub Kicinski <kuba@kernel.org>
Fri, 18 Mar 2022 19:23:42 +0000 (12:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Mar 2022 14:11:38 +0000 (14:11 +0000)
commite9253a28d41e9d5c782689a9cdbf6b97b63e9e9b
tree1c58d92bc84501a0064e648534130c88add05a71
parentf4964ce7ebf3cdaf20e58f3dfb2fecbe4f96f88d
netdevsim: replace port_list_lock with devlink instance lock

Take advantage of the devlink instance lock for protecting
the port list. This will simplify locking even more once
all devlink callbacks hold the instance lock.

We need to add locking in nsim_dev_port_add_all() which used
to assume higher layer protection when accessing the list.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/dev.c
drivers/net/netdevsim/netdevsim.h