Greeting, FYI, we noticed the following commit (built with gcc-7): commit: 5a91d41f89e8874053e12766fa8eb5eaa997d277 ("[PATCH v2] ACPI: Drop rcu usage for MMIO mappings") url: https://github.com/0day-ci/linux/commits/Dan-Williams/ACPI-Drop-rcu-usage-for-MMIO-mappings/20200509-013208 base: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git linux-next in testcase: v4l2 with following parameters: test: device ucode: 0x43 on test machine: 72 threads Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz with 256G 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 [ 15.593161] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935 [ 15.594078] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper/0 [ 15.594078] 2 locks held by swapper/0/1: [ 15.594078] #0: ffff88a08055b188 (&dev->mutex){....}-{3:3}, at: device_driver_attach+0x1d/0x60 [ 15.594078] #1: ffffffff82a1a658 (ghes_notify_lock_irq){....}-{2:2}, at: ghes_probe+0x1c7/0x470 [ 15.594078] irq event stamp: 11350142 [ 15.594078] hardirqs last enabled at (11350141): [] kfree+0x18f/0x2f0 [ 15.594078] hardirqs last disabled at (11350142): [] _raw_spin_lock_irqsave+0x20/0x60 [ 15.594078] softirqs last enabled at (11350110): [] __do_softirq+0x353/0x466 [ 15.594078] softirqs last disabled at (11350103): [] irq_exit+0xe7/0xf0 [ 15.594078] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.7.0-rc4-00022-g5a91d41f89e88 #1 [ 15.594078] Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [ 15.594078] Call Trace: [ 15.594078] dump_stack+0x8f/0xcb [ 15.594078] ___might_sleep+0x175/0x260 [ 15.594078] __mutex_lock+0x55/0x9f0 [ 15.594078] ? cpumask_next+0x17/0x20 [ 15.594078] ? validate_chain+0xdec/0x1240 [ 15.594078] ? rdinit_setup+0x2b/0x2b [ 15.594078] ? acpi_os_rw_map+0x34/0xb0 [ 15.594078] acpi_os_rw_map+0x34/0xb0 [ 15.594078] acpi_os_read_memory+0x34/0xc0 [ 15.594078] ? lock_acquire+0xac/0x390 [ 15.594078] apei_read+0x97/0xb0 [ 15.594078] __ghes_peek_estatus+0x27/0xc0 [ 15.594078] ghes_proc+0x37/0x120 [ 15.594078] ghes_probe+0x1d2/0x470 [ 15.594078] platform_drv_probe+0x37/0x90 [ 15.594078] really_probe+0xef/0x430 [ 15.594078] driver_probe_device+0x110/0x120 [ 15.594078] device_driver_attach+0x4f/0x60 [ 15.594078] __driver_attach+0x9c/0x140 [ 15.594078] ? device_driver_attach+0x60/0x60 [ 15.594078] bus_for_each_dev+0x79/0xc0 [ 15.594078] bus_add_driver+0x147/0x220 [ 15.594078] ? bert_init+0x229/0x229 [ 15.594078] driver_register+0x5b/0xf0 [ 15.594078] ? bert_init+0x229/0x229 [ 15.594078] ghes_init+0x83/0xde [ 15.594078] do_one_initcall+0x5d/0x2f0 [ 15.594078] ? rdinit_setup+0x2b/0x2b [ 15.594078] ? rcu_read_lock_sched_held+0x52/0x80 [ 15.594078] kernel_init_freeable+0x260/0x2da [ 15.594078] ? rest_init+0x250/0x250 [ 15.594078] kernel_init+0xa/0x110 [ 15.594078] ret_from_fork+0x3a/0x50 [ 15.594078] [ 15.594078] ============================= [ 15.594078] [ BUG: Invalid wait context ] [ 15.594078] 5.7.0-rc4-00022-g5a91d41f89e88 #1 Tainted: G W [ 15.594078] ----------------------------- [ 15.594078] swapper/0/1 is trying to lock: [ 15.594078] ffffffff82a0b5c8 (acpi_ioremap_lock){+.+.}-{3:3}, at: acpi_os_rw_map+0x34/0xb0 [ 15.594078] other info that might help us debug this: [ 15.594078] context-{4:4} [ 15.594078] 2 locks held by swapper/0/1: [ 15.594078] #0: ffff88a08055b188 (&dev->mutex){....}-{3:3}, at: device_driver_attach+0x1d/0x60 [ 15.594078] #1: ffffffff82a1a658 (ghes_notify_lock_irq){....}-{2:2}, at: ghes_probe+0x1c7/0x470 [ 15.594078] stack backtrace: [ 15.594078] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.7.0-rc4-00022-g5a91d41f89e88 #1 [ 15.594078] Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [ 15.594078] Call Trace: [ 15.594078] dump_stack+0x8f/0xcb [ 15.594078] __lock_acquire+0x61e/0xbc0 [ 15.594078] lock_acquire+0xac/0x390 [ 15.594078] ? acpi_os_rw_map+0x34/0xb0 [ 15.594078] ? acpi_os_rw_map+0x34/0xb0 [ 15.594078] ? acpi_os_rw_map+0x34/0xb0 [ 15.594078] __mutex_lock+0xa1/0x9f0 [ 15.594078] ? acpi_os_rw_map+0x34/0xb0 [ 15.594078] ? cpumask_next+0x17/0x20 [ 15.594078] ? rdinit_setup+0x2b/0x2b [ 15.594078] ? acpi_os_rw_map+0x34/0xb0 [ 15.594078] acpi_os_rw_map+0x34/0xb0 [ 15.594078] acpi_os_read_memory+0x34/0xc0 [ 15.594078] ? lock_acquire+0xac/0x390 [ 15.594078] apei_read+0x97/0xb0 [ 15.594078] __ghes_peek_estatus+0x27/0xc0 [ 15.594078] ghes_proc+0x37/0x120 [ 15.594078] ghes_probe+0x1d2/0x470 [ 15.594078] platform_drv_probe+0x37/0x90 [ 15.594078] really_probe+0xef/0x430 [ 15.594078] driver_probe_device+0x110/0x120 [ 15.594078] device_driver_attach+0x4f/0x60 [ 15.594078] __driver_attach+0x9c/0x140 [ 15.594078] ? device_driver_attach+0x60/0x60 [ 15.594078] bus_for_each_dev+0x79/0xc0 [ 15.594078] bus_add_driver+0x147/0x220 [ 15.594078] ? bert_init+0x229/0x229 [ 15.594078] driver_register+0x5b/0xf0 [ 15.594078] ? bert_init+0x229/0x229 [ 15.594078] ghes_init+0x83/0xde [ 15.594078] do_one_initcall+0x5d/0x2f0 [ 15.594078] ? rdinit_setup+0x2b/0x2b [ 15.594078] ? rcu_read_lock_sched_held+0x52/0x80 [ 15.594078] kernel_init_freeable+0x260/0x2da [ 15.594078] ? rest_init+0x250/0x250 [ 15.594078] kernel_init+0xa/0x110 [ 15.594078] ret_from_fork+0x3a/0x50 [ 16.109557] GHES: APEI firmware first mode is enabled by APEI bit and WHEA _OSC. [ 16.118199] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 16.125308] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 16.133596] 00:03: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 16.142660] Non-volatile memory driver v1.3 [ 16.147391] Linux agpgart interface v0.103 [ 16.158812] lkdtm: No crash points registered, enable through debugfs [ 16.166314] rdac: device handler registered [ 16.171055] hp_sw: device handler registered [ 16.175838] emc: device handler registered [ 16.180592] alua: device handler registered [ 16.185679] MACsec IEEE 802.1AE [ 16.189408] libphy: Fixed MDIO Bus: probed [ 16.194253] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 16.202138] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 16.208641] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 16.215173] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 16.221901] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k [ 16.229691] igb: Copyright (c) 2007-2014 Intel Corporation. [ 16.235985] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 5.1.0-k [ 16.244549] ixgbe: Copyright (c) 1999-2016 Intel Corporation. [ 16.251177] IOAPIC[9]: Set IRTE entry (P:1 FPD:0 Dst_Mode:1 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:0 Avail:0 Vector:EF Dest:00000001 SID:002C SQ:0 SVT:1) [ 16.266251] IOAPIC[1]: Set routing entry (9-13 -> 0xef -> IRQ 38 Mode:1 Active:1 Dest:1) [ 16.548010] ixgbe 0000:03:00.0: Multiqueue Enabled: Rx Queue count = 63, Tx Queue count = 63 XDP Queue count = 0 [ 16.643801] ixgbe 0000:03:00.0: 32.000 Gb/s available PCIe bandwidth (5.0 GT/s PCIe x8 link) [ 16.677322] ixgbe 0000:03:00.0: MAC: 3, PHY: 0, PBA No: 000000-000 [ 16.684240] ixgbe 0000:03:00.0: 00:1e:67:f7:44:b3 [ 16.838449] ixgbe 0000:03:00.0: Intel(R) 10 Gigabit Network Connection [ 16.845921] libphy: ixgbe-mdio: probed [ 16.850249] IOAPIC[9]: Set IRTE entry (P:1 FPD:0 Dst_Mode:1 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:0 Avail:0 Vector:EF Dest:00000001 SID:002C SQ:0 SVT:1) [ 16.865321] IOAPIC[1]: Set routing entry (9-10 -> 0xef -> IRQ 105 Mode:1 Active:1 Dest:1) [ 17.147743] ixgbe 0000:03:00.1: Multiqueue Enabled: Rx Queue count = 63, Tx Queue count = 63 XDP Queue count = 0 [ 17.243466] ixgbe 0000:03:00.1: 32.000 Gb/s available PCIe bandwidth (5.0 GT/s PCIe x8 link) [ 17.276992] ixgbe 0000:03:00.1: MAC: 3, PHY: 0, PBA No: 000000-000 [ 17.283910] ixgbe 0000:03:00.1: 00:1e:67:f7:44:b4 [ 17.437334] ixgbe 0000:03:00.1: Intel(R) 10 Gigabit Network Connection [ 17.444791] libphy: ixgbe-mdio: probed [ 17.449025] i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 2.8.20-k [ 17.457890] i40e: Copyright (c) 2013 - 2019 Intel Corporation. [ 17.465025] usbcore: registered new interface driver catc [ 17.471076] usbcore: registered new interface driver kaweth [ 17.477311] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver [ 17.485597] usbcore: registered new interface driver pegasus [ 17.491949] usbcore: registered new interface driver rtl8150 [ 17.498295] usbcore: registered new interface driver asix [ 17.504340] usbcore: registered new interface driver cdc_ether [ 17.510870] usbcore: registered new interface driver cdc_eem [ 17.517207] usbcore: registered new interface driver dm9601 [ 17.523455] usbcore: registered new interface driver smsc75xx [ 17.529891] usbcore: registered new interface driver smsc95xx To reproduce: git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp install job.yaml # job file is attached in this email bin/lkp run job.yaml Thanks, Rong Chen