]> git.baikalelectronics.ru Git - kernel.git/commit
net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc
authorAntoine Tenart <atenart@kernel.org>
Wed, 23 Dec 2020 21:23:23 +0000 (22:23 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 28 Dec 2020 21:26:46 +0000 (13:26 -0800)
commit51d08707a5d776865beb0578e149cad88f87dfba
tree5894ca9c9d9f474c897e198b9429bf2abc947bc9
parent965082f69ad146c60affc43cb53003c96c77853e
net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc

Accesses to dev->xps_rxqs_map (when using dev->num_tc) should be
protected by the rtnl lock, like we do for netif_set_xps_queue. I didn't
see an actual bug being triggered, but let's be safe here and take the
rtnl lock while accessing the map in sysfs.

Fixes: 94dc6b1acdbb ("net-sysfs: Add interface for Rx queue(s) map per Tx queue")
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/net-sysfs.c