Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: 81bb8ff453eb20410103684e277befb5bc96f025 ("[PATCH net-next v2 06/12] net: assert the rtnl lock is held when calling __netif_set_xps_queue")
url: https://github.com/0day-ci/linux/commits/Antoine-Tenart/net-xps-improve-the-xps-maps-handling/20210209-081506
base: https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git 6626a0266566c5aea16178c5e6cd7fc4db3f2f56
in testcase: boot
on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 8G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+-------------------------------------------------------------------------+------------+------------+
| | 65df35412a | 81bb8ff453 |
+-------------------------------------------------------------------------+------------+------------+
| assertion_failed | 0 | 35 |
| WARNING:at_net/core/dev.c:#__netif_set_xps_queue | 0 | 35 |
| EIP:__netif_set_xps_queue | 0 | 35 |
+-------------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>
[ 104.847236] ------------[ cut here ]------------
[ 104.848653] RTNL: assertion failed at net/core/dev.c (2619)
[ 104.850136] WARNING: CPU: 0 PID: 1 at net/core/dev.c:2619 __netif_set_xps_queue+0xb37/0xc00
[ 104.851720] Modules linked in:
[ 104.852896] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G S W 5.11.0-rc4-00641-g81bb8ff453eb #1
[ 104.854579] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 104.856184] EIP: __netif_set_xps_queue+0xb37/0xc00
[ 104.857556] Code: 5d c3 80 3d 30 2e 27 d6 00 0f 85 14 f5 ff ff 68 3b 0a 00 00 68 ab 13 65 d5 68 44 e8 d9 d4 c6 05 30 2e 27 d6 01 e8 6e 70 89 00 <0f> 0b 83 c4 0c e9 ef f4 ff ff 8b 5d c4 85 db 0f 84 7a fe ff ff 8b
[ 104.861089] EAX: 0000002f EBX: 00000000 ECX: 00000001 EDX: 00000000
[ 104.862646] ESI: 00000000 EDI: 00000001 EBP: c1c67d94 ESP: c1c67d34
[ 104.864181] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010282
[ 104.865807] CR0: 80050033 CR2: 00000000 CR3: 16932000 CR4: 000406d0
[ 104.867346] Call Trace:
[ 104.868607] ? rcu_read_lock_sched_held+0x47/0x80
[ 104.870085] ? find_next_bit+0xf/0x20
[ 104.871451] ? cpumask_next+0x1f/0x40
[ 104.872818] ? cpumask_next_wrap+0x21/0x60
[ 104.874195] virtnet_set_affinity+0x135/0x1a0
[ 104.875604] init_vqs+0x212/0x260
[ 104.876932] virtnet_probe+0x38a/0x880
[ 104.878266] ? virtio_vdpa_get_status+0x1c/0x20
[ 104.879649] virtio_dev_probe+0x1a8/0x280
[ 104.881046] really_probe+0x18d/0x400
[ 104.882368] driver_probe_device+0xd9/0x1a0
[ 104.883690] ? mutex_lock_nested+0x19/0x20
[ 104.885038] ? __device_driver_lock+0x25/0x60
[ 104.886387] device_driver_attach+0x49/0x60
[ 104.887710] __driver_attach+0x81/0x140
[ 104.889018] ? bind_store+0x100/0x100
[ 104.890286] ? device_driver_attach+0x60/0x60
[ 104.891584] bus_for_each_dev+0x5d/0xa0
[ 104.892868] driver_attach+0x19/0x20
[ 104.894063] ? device_driver_attach+0x60/0x60
[ 104.895304] bus_add_driver+0x117/0x1e0
[ 104.896497] driver_register+0x66/0xc0
[ 104.897707] ? veth_init+0x14/0x14
[ 104.898842] register_virtio_driver+0x1b/0x40
[ 104.900053] virtio_net_driver_init+0x61/0x86
[ 104.901299] do_one_initcall+0x60/0x320
[ 104.902500] ? rcu_read_lock_sched_held+0x47/0x80
[ 104.903732] ? trace_initcall_level+0x84/0xac
[ 104.904976] kernel_init_freeable+0x208/0x257
[ 104.906177] ? rest_init+0x22d/0x22d
[ 104.907304] kernel_init+0xd/0xf3
[ 104.908386] ret_from_fork+0x1c/0x28
[ 104.909580] irq event stamp: 51665545
[ 104.910652] hardirqs last enabled at (51665553): [<cdfc328d>] console_unlock+0x4cd/0x5e0
[ 104.912085] hardirqs last disabled at (51665560): [<cdfc31f5>] console_unlock+0x435/0x5e0
[ 104.913537] softirqs last enabled at (51664338): [<d3016930>] __do_softirq+0x2f0/0x44b
[ 104.914904] softirqs last disabled at (51664333): [<cdecb405>] call_on_stack+0x45/0x60
[ 104.916226] ---[ end trace b6addf977bb74596 ]---
To reproduce:
# build kernel
cd linux
cp config-5.11.0-rc4-00641-g81bb8ff453eb .config
make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 olddefconfig prepare modules_prepare bzImage
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
Oliver Sang