mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 02:20:40 +00:00
net-sysfs: update the queue counts in the unregistration path
[ Upstream commit d7dac08341
]
When updating Rx and Tx queue kobjects, the queue count should always be
updated to match the queue kobjects count. This was not done in the net
device unregistration path, fix it. Tracking all queue count updates
will allow in a following up patch to detect illegal updates.
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f7bae4d459
commit
0abd3f9903
1 changed files with 3 additions and 0 deletions
|
@ -1820,6 +1820,9 @@ static void remove_queue_kobjects(struct net_device *dev)
|
|||
|
||||
net_rx_queue_update_kobjects(dev, real_rx, 0);
|
||||
netdev_queue_update_kobjects(dev, real_tx, 0);
|
||||
|
||||
dev->real_num_rx_queues = 0;
|
||||
dev->real_num_tx_queues = 0;
|
||||
#ifdef CONFIG_SYSFS
|
||||
kset_unregister(dev->queues_kset);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue