Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: 3b9c1d377d67072d1d8a2373b4969103cca00dab ("x86/msi: Consolidate MSI
allocation")
https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git x86/irq
in testcase: boot
on test machine: 8 threads Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz with 16G memory
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
[ 6.377874] BUG: kernel NULL pointer dereference, address: 0000000000000018
[ 6.378864] #PF: supervisor read access in kernel mode
[ 6.378864] #PF: error_code(0x0000) - not-present page
[ 6.378864] PGD 0 P4D 0
[ 6.378864] Oops: 0000 [#1] SMP PTI
[ 6.378864] CPU: 3 PID: 1 Comm: swapper/0 Tainted: G I
5.9.0-rc5-00018-g3b9c1d377d670 #1
[ 6.378864] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016
[ 6.378864] RIP: 0010:msi_desc_to_pci_dev+0x5/0x20
[ 6.378864] Code: cc cc cc cc cc 0f 1f 44 00 00 8b 05 35 cc 12 01 c3 66 66 2e 0f 1f 84
00 00 00 00 00 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <48> 8b 47 18 48 2d b0 00
00 00 c3 66 66 2e 0f 1f 84 00 00 00 00 00
[ 6.378864] RSP: 0000:ffffc9000002bad8 EFLAGS: 00010297
[ 6.378864] RAX: 0000000000000000 RBX: ffff88845956a000 RCX: 0000000000000000
[ 6.378864] RDX: ffffc9000002bae8 RSI: 0000000000000000 RDI: 0000000000000000
[ 6.378864] RBP: ffff888459a98c00 R08: ffff88845956a2e0 R09: 0000000000000000
[ 6.378864] R10: 0000000000000008 R11: 0000000000000000 R12: 0000000000000001
[ 6.378864] R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
[ 6.378864] FS: 0000000000000000(0000) GS:ffff888459cc0000(0000)
knlGS:0000000000000000
[ 6.378864] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6.378864] CR2: 0000000000000018 CR3: 000000045860a001 CR4: 00000000003706e0
[ 6.378864] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 6.378864] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 6.378864] Call Trace:
[ 6.378864] intel_get_irq_domain+0x24/0xc0
[ 6.378864] native_setup_msi_irqs+0x3b/0xa0
[ 6.378864] __pci_enable_msi_range+0x187/0x2c0
[ 6.378864] pci_alloc_irq_vectors_affinity+0xbf/0x100
[ 6.378864] pcie_port_device_register+0x138/0x560
[ 6.378864] ? _cond_resched+0x19/0x40
[ 6.378864] pcie_portdrv_probe+0x2d/0xc0
[ 6.378864] local_pci_probe+0x42/0x80
[ 6.378864] ? _cond_resched+0x19/0x40
[ 6.378864] pci_device_probe+0x107/0x1c0
[ 6.378864] really_probe+0x1ca/0x420
[ 6.378864] driver_probe_device+0xe1/0x160
[ 6.378864] device_driver_attach+0x53/0x60
[ 6.378864] __driver_attach+0x8a/0x160
[ 6.378864] ? device_driver_attach+0x60/0x60
[ 6.378864] ? device_driver_attach+0x60/0x60
[ 6.378864] bus_for_each_dev+0x78/0xc0
[ 6.378864] bus_add_driver+0x14d/0x200
[ 6.378864] driver_register+0x6c/0xc0
[ 6.378864] ? dmi_pcie_pme_disable_msi+0x1f/0x1f
[ 6.378864] do_one_initcall+0x46/0x204
[ 6.378864] kernel_init_freeable+0x1da/0x23c
[ 6.378864] ? rest_init+0xc6/0xc6
[ 6.378864] kernel_init+0xa/0x11a
[ 6.378864] ret_from_fork+0x22/0x30
[ 6.378864] Modules linked in:
[ 6.378864] CR2: 0000000000000018
[ 6.378864] ---[ end trace 33aa934cfab777f0 ]---
To reproduce:
# build kernel
cd linux
cp config-5.9.0-rc5-00018-g3b9c1d377d670 .config
make HOSTCC=gcc-9 CC=gcc-9 ARCH=x86_64 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,
Rong Chen