]> git.baikalelectronics.ru Git - kernel.git/commit
net-sysfs: warn if new queue objects are being created during device unregistration
authorAntoine Tenart <atenart@kernel.org>
Tue, 7 Dec 2021 14:57:25 +0000 (15:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Dec 2021 02:36:32 +0000 (18:36 -0800)
commit7b547b40ca536f374dc0c184af5b4e4469dc57aa
treee4421fe74b44f5c583dd69caf540a4436fd23304
parent50a4d69bab5964c890aa092c489c6b64bf2ac392
net-sysfs: warn if new queue objects are being created during device unregistration

Calling netdev_queue_update_kobjects is allowed during device
unregistration since commit 99c8ceb2b77c ("net: Adjust TX queue kobjects
if number of queues changes during unregister"). But this is solely to
allow queue unregistrations. Any path attempting to add new queues after
a device started its unregistration should be fixed.

This patch adds a warning to detect such illegal use.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/net-sysfs.c