Commit c93e3474 authored by Antoine Tenart's avatar Antoine Tenart Committed by Yang Yingliang
Browse files

net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc



stable inclusion
from linux-4.19.167
commit e552fbd60944d6ae3c1942d9cf5eae88112d36eb

--------------------------------

[ Upstream commit 4ae2bb81 ]

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: 8af2c06f ("net-sysfs: Add interface for Rx queue(s) map per Tx queue")
Signed-off-by: default avatarAntoine Tenart <atenart@kernel.org>
Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>

Signed-off-by: default avatarAichun Li <liaichun@huawei.com>
reviewed-by: default avatarwangxiaopeng <wangxiaopeng7@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent da530d73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment