lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210603023216.GA21881@xsang-OptiPlex-9020>
Date:   Thu, 3 Jun 2021 10:32:16 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     0day robot <lkp@...el.com>, LKML <linux-kernel@...r.kernel.org>,
        lkp@...ts.01.org, Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Michal Hocko <mhocko@...nel.org>,
        Anshuman Khandual <anshuman.khandual@....com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Pavel Tatashin <pasha.tatashin@...een.com>, linux-mm@...ck.org,
        Oscar Salvador <osalvador@...e.de>
Subject: [mm,page_alloc]  [confidence: ] acb5758bf4:
 BUG:sleeping_function_called_from_invalid_context_at_include/linux/percpu-rwsem.h



Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: acb5758bf41a116c65f7b3fdfd3d79b54ebfad9f ("[PATCH v2 1/3] mm,page_alloc: Use {get,put}_online_mems() to get stable zone's values")
url: https://github.com/0day-ci/linux/commits/Oscar-Salvador/Memory-hotplug-locking-cleanup/20210602-232017


in testcase: boot

on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+-----------------------------------------------------------------------------------+-----------+------------+
|                                                                                   | v5.13-rc4 | acb5758bf4 |
+-----------------------------------------------------------------------------------+-----------+------------+
| boot_successes                                                                    | 167       | 0          |
| boot_failures                                                                     | 0         | 6          |
| BUG:sleeping_function_called_from_invalid_context_at_include/linux/percpu-rwsem.h | 0         | 6          |
| WARNING:at_kernel/sched/core.c:#__might_sleep                                     | 0         | 1          |
| RIP:__might_sleep                                                                 | 0         | 1          |
| RIP:smpboot_thread_fn                                                             | 0         | 1          |
+-----------------------------------------------------------------------------------+-----------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <oliver.sang@...el.com>


[    0.951423] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[    0.953745] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 2, name: kthreadd
[    0.953745] CPU: 0 PID: 2 Comm: kthreadd Not tainted 5.13.0-rc4-00001-gacb5758bf41a #1
[    0.953745] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[    0.953745] Call Trace:
[    0.953745] dump_stack (kbuild/src/consumer/lib/dump_stack.c:122) 
[    0.953745] ___might_sleep (kbuild/src/consumer/kernel/sched/core.c:8339 kbuild/src/consumer/kernel/sched/core.c:8296) 
[    0.953745] get_online_mems (kbuild/src/consumer/include/linux/percpu-rwsem.h:49 kbuild/src/consumer/mm/memory_hotplug.c:69) 
[    0.953745] bad_range (kbuild/src/consumer/mm/page_alloc.c:589 kbuild/src/consumer/mm/page_alloc.c:617) 
[    0.953745] expand (kbuild/src/consumer/mm/page_alloc.c:2231) 
[    0.953745] rmqueue_bulk+0x161/0x359 
[    0.953745] __rmqueue_pcplist (kbuild/src/consumer/mm/page_alloc.c:3471 (discriminator 3)) 
[    0.953745] rmqueue (kbuild/src/consumer/mm/page_alloc.c:3499 kbuild/src/consumer/mm/page_alloc.c:3527) 
[    0.953745] ? __alloc_pages (kbuild/src/consumer/mm/page_alloc.c:5198) 
[    0.953745] ? __cond_resched (kbuild/src/consumer/kernel/sched/core.c:6994) 
[    0.953745] ? post_alloc_hook (kbuild/src/consumer/arch/x86/include/asm/atomic.h:29 kbuild/src/consumer/include/asm-generic/atomic-instrumented.h:28 kbuild/src/consumer/include/linux/jump_label.h:254 kbuild/src/consumer/include/linux/mm.h:2959 kbuild/src/consumer/mm/page_alloc.c:2345) 
[    0.953745] get_page_from_freelist (kbuild/src/consumer/mm/page_alloc.c:3989) 
[    0.953745] __alloc_pages (kbuild/src/consumer/mm/page_alloc.c:5198) 
[    0.953745] __vmalloc_area_node+0x133/0x1fd 
[    0.953745] __vmalloc_node_range (kbuild/src/consumer/mm/vmalloc.c:2916) 
[    0.953745] copy_process (kbuild/src/consumer/kernel/fork.c:245 kbuild/src/consumer/kernel/fork.c:869 kbuild/src/consumer/kernel/fork.c:1947) 
[    0.953745] ? kernel_clone (kbuild/src/consumer/kernel/fork.c:2503) 
[    0.953745] kernel_clone (kbuild/src/consumer/kernel/fork.c:2503) 
[    0.953745] kernel_thread (kbuild/src/consumer/kernel/fork.c:2556) 
[    0.953745] ? kthread_flush_worker (kbuild/src/consumer/kernel/kthread.c:266) 
[    0.953745] kthreadd (kbuild/src/consumer/kernel/kthread.c:337 kbuild/src/consumer/kernel/kthread.c:679) 
[    0.953745] ? kthread_is_per_cpu (kbuild/src/consumer/kernel/kthread.c:652) 
[    0.953745] ret_from_fork (kbuild/src/consumer/arch/x86/entry/entry_64.S:300) 
[    0.954392] smp: Bringing up secondary CPUs ...
[    0.956051] x86: Booting SMP configuration:
[    0.957352] .... node  #0, CPUs:      #1
[    0.181973] kvm-clock: cpu 1, msr 303a041, secondary cpu clock
[    0.181973] masked ExtINT on CPU#1
[    0.181973] smpboot: CPU 1 Converting physical 0 to logical die 1
[    0.965836] kvm-guest: stealtime: cpu 1, msr 42fd17200
[    0.967437] smp: Brought up 1 node, 2 CPUs
[    0.969765] smpboot: Max logical packages: 2
[    0.970961] smpboot: Total of 2 processors activated (9575.99 BogoMIPS)
[    0.974300] devtmpfs: initialized
[    0.975023] x86/mm: Memory block size: 128MB
[    0.982906] wait_for_initramfs() called before rootfs_initcalls
[    0.982977] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.985774] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.990745] NET: Registered protocol family 16
[    0.993435] audit: initializing netlink subsys (disabled)
[    0.998316] thermal_sys: Registered thermal governor 'step_wise'
[    0.998322] thermal_sys: Registered thermal governor 'user_space'
[    0.998322] audit: type=2000 audit(1622678220.193:1): state=initialized audit_enabled=0 res=1
[    1.004221] cpuidle: using governor ladder
[    1.004221] cpuidle: using governor menu
[    1.006848] ACPI: bus type PCI registered
[    1.008400] PCI: Using configuration type 1 for base access
[    1.035251] Kprobes globally optimized
[    1.037864] ACPI: Added _OSI(Module Device)
[    1.039172] ACPI: Added _OSI(Processor Device)
[    1.041772] ACPI: Added _OSI(3.0 _SCP Extensions)
[    1.043168] ACPI: Added _OSI(Processor Aggregator Device)
[    1.044705] ACPI: Added _OSI(Linux-Dell-Video)
[    1.045851] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    1.047408] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    1.050725] ACPI: 1 ACPI AML tables successfully acquired and loaded
[    1.054357] ACPI: Interpreter enabled
[    1.055555] ACPI: (supports S0 S3 S4 S5)
[    1.056759] ACPI: Using IOAPIC for interrupt routing
[    1.057923] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.062087] ACPI: Enabled 2 GPEs in block 00 to 0F
[    1.072359] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    1.073771] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[    1.076037] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[    1.078069] PCI host bridge to bus 0000:00
[    1.079325] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    1.081220] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    1.081778] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    1.083994] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window]
[    1.085761] pci_bus 0000:00: root bus resource [mem 0x440000000-0x4bfffffff window]
[    1.087961] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.089587] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[    1.090932] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[    1.093853] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[    1.101023] pci 0000:00:01.1: reg 0x20: [io  0xc040-0xc04f]
[    1.104173] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
[    1.105768] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
[    1.107592] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
[    1.109448] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
[    1.110306] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[    1.112295] pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
[    1.113821] pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
[    1.116585] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
[    1.120678] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
[    1.125763] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff]
[    1.135974] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref]
[    1.139173] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000
[    1.142567] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff]
[    1.145759] pci 0000:00:03.0: reg 0x14: [io  0xc000-0xc03f]
[    1.154798] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
[    1.157430] pci 0000:00:04.0: [8086:25ab] type 00 class 0x088000
[    1.158615] pci 0000:00:04.0: reg 0x10: [mem 0xfebf1000-0xfebf100f]
[    1.167002] ACPI: PCI: Interrupt link LNKA configured for IRQ 10
[    1.169426] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
[    1.169966] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
[    1.171809] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
[    1.173641] ACPI: PCI: Interrupt link LNKS configured for IRQ 9
[    1.174661] iommu: Default domain type: Translated
[    1.176216] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    1.176216] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    1.177775] pci 0000:00:02.0: vgaarb: bridge control possible
[    1.179446] vgaarb: loaded
[    1.180958] SCSI subsystem initialized
[    1.182073] libata version 3.00 loaded.
[    1.183554] ACPI: bus type USB registered
[    1.184998] usbcore: registered new interface driver usbfs
[    1.185927] usbcore: registered new interface driver hub
[    1.187467] usbcore: registered new device driver usb
[    1.189271] pps_core: LinuxPPS API ver. 1 registered
[    1.189755] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@...ux.it>
[    1.192502] PTP clock support registered
[    1.194111] Advanced Linux Sound Architecture Driver Initialized.
[    1.196236] PCI: Using ACPI for IRQ routing
[    1.197766] PCI: pci_cache_line_size set to 64 bytes
[    1.199350] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff]
[    1.201032] e820: reserve RAM buffer [mem 0xbffe0000-0xbfffffff]
[    1.202909] clocksource: Switched to clocksource kvm-clock
[    1.314382] VFS: Disk quotas dquot_6.6.0
[    1.315518] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.317540] pnp: PnP ACPI init
[    1.318663] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
[    1.324095] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active)
[    1.326382] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active)
[    1.328128] pnp 00:03: [dma 2]
[    1.329228] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active)
[    1.331299] pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active)
[    1.333537] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active)
[    1.335853] pnp 00:06: Plug and Play ACPI device, IDs PNP0501 (active)
[    1.338038] pnp: PnP ACPI: found 7 devices
[    1.351709] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    1.358348] NET: Registered protocol family 2
[    1.360864] IP idents hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    1.367631] tcp_listen_portaddr_hash hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    1.370180] TCP established hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    1.372947] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    1.376215] TCP: Hash tables configured (established 131072 bind 65536)
[    1.378753] UDP hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    1.380713] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    1.382999] NET: Registered protocol family 1
[    1.388371] RPC: Registered named UNIX socket transport module.
[    1.390098] RPC: Registered udp transport module.
[    1.391490] RPC: Registered tcp transport module.
[    1.392898] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.394621] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    1.396328] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    1.398062] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]


To reproduce:

        # build kernel
	cd linux
	cp config-5.13.0-rc4-00001-gacb5758bf41a .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



---
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.13.0-rc4-00001-gacb5758bf41a" of type "text/plain" (120192 bytes)

View attachment "job-script" of type "text/plain" (4400 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (16444 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ