]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mlxsw: spectrum_router: Take router lock from netdev listener
authorIdo Schimmel <idosch@mellanox.com>
Fri, 21 Feb 2020 17:54:12 +0000 (19:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
commitb43c12e7a6b4da71cd875e6ffeed920ecf476893
tree1346dd22afedcbde3790d4665d6673b67f75ba2a
parent6a5c69cd5512b450816fa75b46ac244a980ad09f
mlxsw: spectrum_router: Take router lock from netdev listener

One entry point into the routing code is from the netdev listener block.
Some netdev events require access to internal router structures. For
example, changing the MTU of a netdev requires looking-up the backing
RIF and adjusting its MTU.

In order to serialize access to shared router structures, take the
router lock when processing netdev events that require access to it.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c