]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc
authorAntoine Tenart <atenart@kernel.org>
Wed, 23 Dec 2020 21:23:21 +0000 (22:23 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 19 Feb 2021 15:43:43 +0000 (16:43 +0100)
commit6e040a6ed84071a6c81e0f9430a9f6459200c1d9
tree1167279a65c9776dd6d0bd3401d0108d69f09d9f
parent31aa978329d5980db54ea324b55ca0bcc241dcab
net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc

BugLink: https://bugs.launchpad.net/bugs/1913486
[ Upstream commit fb25038586d0064123e393cadf1fadd70a9df97a ]

Accesses to dev->xps_cpus_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: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
net/core/net-sysfs.c