[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220210084629.GF4074@xsang-OptiPlex-9020>
Date: Thu, 10 Feb 2022 16:46:29 +0800
From: kernel test robot <oliver.sang@...el.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: lkp@...ts.01.org, lkp@...el.com,
LKML <linux-kernel@...r.kernel.org>
Subject: [random] cd97262cd5: BUG:spinlock_bad_magic_on_CPU
Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: cd97262cd52e82a7e5f6d0f96f37dc6383e95a88 ("random: use simpler fast key erasure flow on per-cpu keys")
https://github.com/ammarfaizi2/linux-block crng/random/jd/fast-key-erasure
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -cpu Icelake-Server -smp 4 -m 16G
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 <oliver.sang@...el.com>
[ 0.000000][ T0] BUG: spinlock bad magic on CPU#0, swapper/0
[ 0.000000][ T0] lock: base_crng+0x28/0x4c, .magic: 00000000, .owner: swapper/0, .owner_cpu: 0
[ 0.000000][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.17.0-rc3-00016-gcd97262cd52e #1
[ 0.000000][ T0] Call Trace:
[ 0.000000][ T0] dump_stack_lvl (lib/dump_stack.c:107)
[ 0.000000][ T0] dump_stack (lib/dump_stack.c:114)
[ 0.000000][ T0] spin_dump.cold (kernel/locking/spinlock_debug.c:70 (discriminator 12))
[ 0.000000][ T0] do_raw_spin_unlock (kernel/locking/spinlock_debug.c:77 kernel/locking/spinlock_debug.c:99 kernel/locking/spinlock_debug.c:140)
[ 0.000000][ T0] _raw_spin_unlock_irqrestore (include/linux/spinlock_api_smp.h:151 kernel/locking/spinlock.c:194)
[ 0.000000][ T0] add_device_randomness (drivers/char/random.c:508 drivers/char/random.c:732)
[ 0.000000][ T0] ? dmi_format_ids+0xfd/0xfd
[ 0.000000][ T0] dmi_walk_early (drivers/firmware/dmi_scan.c:151)
[ 0.000000][ T0] dmi_present (drivers/firmware/dmi_scan.c:605)
[ 0.000000][ T0] dmi_setup (drivers/firmware/dmi_scan.c:730 drivers/firmware/dmi_scan.c:816)
[ 0.000000][ T0] setup_arch (arch/x86/kernel/setup.c:673 arch/x86/kernel/setup.c:950)
[ 0.000000][ T0] ? vprintk (kernel/printk/printk_safe.c:50)
[ 0.000000][ T0] start_kernel (init/main.c:275 (discriminator 3) init/main.c:473 (discriminator 3) init/main.c:951 (discriminator 3))
[ 0.000000][ T0] ? set_intr_gate (arch/x86/kernel/idt.c:199)
[ 0.000000][ T0] ? early_idt_handler_common (arch/x86/kernel/head_32.S:417)
[ 0.000000][ T0] i386_start_kernel (arch/x86/kernel/head32.c:57)
[ 0.000000][ T0] startup_32_smp (arch/x86/kernel/head_32.S:328)
[ 0.000000][ T0] SMBIOS 2.8 present.
[ 0.000000][ T0] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 0.000000][ T0] Hypervisor detected: KVM
[ 0.000000][ T0] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000004][ T0] kvm-clock: using sched offset of 3050662630 cycles
[ 0.000558][ T0] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.002221][ T0] tsc: Detected 2194.916 MHz processor
[ 0.004015][ T0] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.004729][ T0] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.005330][ T0] last_pfn = 0x440000 max_arch_pfn = 0x1000000
[ 0.005958][ T0] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.006727][ T0] Scan for SMP in [mem 0x00000000-0x000003ff]
[ 0.007350][ T0] Scan for SMP in [mem 0x0009fc00-0x0009ffff]
[ 0.007939][ T0] Scan for SMP in [mem 0x000f0000-0x000fffff]
[ 0.013120][ T0] found SMP MP-table at [mem 0x000f5a60-0x000f5a6f]
[ 0.013805][ T0] mpc: f5a70-f5b7c
[ 0.014169][ T0] initial memory mapped: [mem 0x00000000-0x0c7fffff]
[ 0.014860][ T0] RAMDISK: [mem 0x606a7000-0x7fffffff]
[ 0.015372][ T0] Allocated new RAMDISK: [mem 0x16ea5000-0x367fd116]
[ 0.314907][ T0] Move RAMDISK from [mem 0x606a7000-0x7ffff116] to [mem 0x16ea5000-0x367fd116]
[ 0.315801][ T0] ACPI: Early table checksum verification disabled
[ 0.316394][ T0] ACPI: RSDP 0x00000000000F5A10 000014 (v00 BOCHS )
[ 0.317001][ T0] ACPI: RSDT 0x00000000BFFE1405 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.317873][ T0] ACPI: FACP 0x00000000BFFE12C9 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.318732][ T0] ACPI: DSDT 0x00000000BFFDFDC0 001509 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.319584][ T0] ACPI: FACS 0x00000000BFFDFD80 000040
[ 0.320080][ T0] ACPI: APIC 0x00000000BFFE133D 000090 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.320936][ T0] ACPI: HPET 0x00000000BFFE13CD 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.321802][ T0] ACPI: Reserving FACP table memory at [mem 0xbffe12c9-0xbffe133c]
[ 0.322508][ T0] ACPI: Reserving DSDT table memory at [mem 0xbffdfdc0-0xbffe12c8]
[ 0.323226][ T0] ACPI: Reserving FACS table memory at [mem 0xbffdfd80-0xbffdfdbf]
[ 0.323962][ T0] ACPI: Reserving APIC table memory at [mem 0xbffe133d-0xbffe13cc]
[ 0.324727][ T0] ACPI: Reserving HPET table memory at [mem 0xbffe13cd-0xbffe1404]
[ 0.325526][ T0] mapped APIC to ffffc000 ( fee00000)
[ 0.326163][ T0] No NUMA configuration found
[ 0.326681][ T0] Faking a node at [mem 0x0000000000000000-0x000000043fffffff]
[ 0.327382][ T0] NODE_DATA(0) allocated [mem 0x16ea3000-0x16ea4fff]
[ 0.327997][ T0] 16536MB HIGHMEM available.
[ 0.328416][ T0] 871MB LOWMEM available.
[ 0.328809][ T0] max_low_pfn = 367fe, highstart_pfn = 367fe
[ 0.329357][ T0] Low memory ends at vaddr f67fe000
[ 0.329840][ T0] High memory starts at vaddr f67fe000
[ 0.330327][ T0] mapped low ram: 0 - 367fe000
[ 0.330769][ T0] low ram: 0 - 367fe000
[ 0.331224][ T0] Zone ranges:
[ 0.331536][ T0] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.332181][ T0] Normal [mem 0x0000000001000000-0x00000000367fdfff]
[ 0.332823][ T0] HighMem [mem 0x00000000367fe000-0x000000043fffffff]
[ 0.333465][ T0] Movable zone start for each node
[ 0.333952][ T0] Early memory node ranges
[ 0.334349][ T0] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.335006][ T0] node 0: [mem 0x0000000000100000-0x00000000bffdefff]
[ 0.335660][ T0] node 0: [mem 0x0000000100000000-0x000000043fffffff]
[ 0.336309][ T0] Initmem setup node 0 [mem 0x0000000000001000-0x000000043fffffff]
[ 0.337802][ T0] On node 0, zone DMA: 1 pages in unavailable ranges
[ 0.337905][ T0] On node 0, zone DMA: 97 pages in unavailable ranges
[ 0.492895][ T0] On node 0, zone HighMem: 33 pages in unavailable ranges
[ 0.493594][ T0] Using APIC driver default
[ 0.494928][ T0] ACPI: PM-Timer IO Port: 0x608
[ 0.495376][ T0] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.496025][ T0] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.496727][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.497355][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 00, APIC ID 0, APIC INT 02
[ 0.498099][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.498789][ T0] Int: type 0, pol 1, trig 3, bus 00, IRQ 05, APIC ID 0, APIC INT 05
[ 0.499539][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.500241][ T0] Int: type 0, pol 1, trig 3, bus 00, IRQ 09, APIC ID 0, APIC INT 09
[ 0.500976][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.501684][ T0] Int: type 0, pol 1, trig 3, bus 00, IRQ 0a, APIC ID 0, APIC INT 0a
[ 0.502428][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.503130][ T0] Int: type 0, pol 1, trig 3, bus 00, IRQ 0b, APIC ID 0, APIC INT 0b
[ 0.503885][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 01, APIC ID 0, APIC INT 01
[ 0.504613][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 03, APIC ID 0, APIC INT 03
[ 0.505341][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 04, APIC ID 0, APIC INT 04
[ 0.506102][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 06, APIC ID 0, APIC INT 06
[ 0.506851][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 07, APIC ID 0, APIC INT 07
[ 0.507601][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 08, APIC ID 0, APIC INT 08
[ 0.508387][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 0c, APIC ID 0, APIC INT 0c
[ 0.509185][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 0d, APIC ID 0, APIC INT 0d
[ 0.509944][ T0] Int: type 0, pol 0, trig 0, bus 00, IRQ 0e, APIC ID 0, APIC INT 0e
To reproduce:
# build kernel
cd linux
cp config-5.17.0-rc3-00016-gcd97262cd52e .config
make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules
make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 INSTALL_MOD_PATH=<mod-install-dir> modules_install
cd <mod-install-dir>
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/lkp@lists.01.org Intel Corporation
Thanks,
Oliver Sang
View attachment "config-5.17.0-rc3-00016-gcd97262cd52e" of type "text/plain" (154042 bytes)
View attachment "job-script" of type "text/plain" (4674 bytes)
Download attachment "dmesg.xz" of type "application/x-xz" (7872 bytes)
Powered by blists - more mailing lists