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>] [day] [month] [year] [list]
Message-ID: <20180228011406.h7uov7426ywdftkd@shao2-debian>
Date:   Wed, 28 Feb 2018 09:14:06 +0800
From:   kernel test robot <shun.hao@...el.com>
To:     Pavel Tatashin <pasha.tatashin@...cle.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Daniel Jordan <daniel.m.jordan@...cle.com>,
        Steven Sistare <steven.sistare@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Masayoshi Mizuma <m.mizuma@...fujitsu.com>,
        Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...e.com>,
        Catalin Marinas <catalin.marinas@....com>,
        AKASHI Takahiro <takahiro.akashi@...aro.org>,
        Gioh Kim <gi-oh.kim@...fitbricks.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Yaowei Bai <baiyaowei@...s.chinamobile.com>,
        Wei Yang <richard.weiyang@...il.com>,
        Paul Burton <paul.burton@...s.com>,
        Miles Chen <miles.chen@...iatek.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Johannes Weiner <hannes@...xchg.org>,
        LKML <linux-kernel@...r.kernel.org>, lkp@...org
Subject: [lkp-robot] [mm]  df2af627c7:
 BUG:sleeping_function_called_from_invalid_context_at_include/linux/percpu-rwsem.h


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

commit: df2af627c79ad4273b4b4c49711252c084490fd2 ("mm: initialize pages on demand during boot")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master

in testcase: boot

on test machine: qemu-system-x86_64 -enable-kvm -m 420M

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


+-----------------------------------------------------------------------------------+------------+------------+
|                                                                                   | 47fc40a7ee | df2af627c7 |
+-----------------------------------------------------------------------------------+------------+------------+
| boot_successes                                                                    | 0          | 0          |
| boot_failures                                                                     | 12         | 19         |
| BUG:KASAN:use-after-scope_in_c                                                    | 12         | 19         |
| invoked_oom-killer:gfp_mask=0x                                                    | 10         | 15         |
| Mem-Info                                                                          | 9          | 15         |
| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes                  | 9          | 15         |
| BUG:sleeping_function_called_from_invalid_context_at_include/linux/percpu-rwsem.h | 0          | 19         |
+-----------------------------------------------------------------------------------+------------+------------+



[    0.054881] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:34
[    0.055015] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
[    0.055749] INFO: lockdep is turned off.
[    0.056015] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G    B            4.16.0-rc2-00103-gdf2af62 #1
[    0.057000] Call Trace:
[    0.057000]  dump_stack+0x14b/0x22d
[    0.057000]  ? arch_local_irq_restore+0x16/0x16
[    0.057000]  ___might_sleep+0x335/0x382
[    0.057000]  ? in_sched_functions+0x54/0x54
[    0.057000]  ? page_alloc_init_late+0x8f/0x3b6
[    0.057000]  ? lock_contended+0x578/0x578
[    0.057000]  __might_sleep+0x190/0x1a3
[    0.057000]  cpus_read_lock+0x28/0xc0
[    0.057000]  static_key_disable+0x11/0x36
[    0.057000]  page_alloc_init_late+0xa2/0x3b6
[    0.057000]  ? setup_nr_node_ids+0x57/0x57
[    0.057000]  ? __bitmap_weight+0xab/0xb8
[    0.057000]  kernel_init_freeable+0x28b/0x69d
[    0.057000]  ? __clear_rsb+0x15/0x3d
[    0.057000]  ? rest_init+0x156/0x156
[    0.057000]  ? rest_init+0x156/0x156
[    0.057000]  kernel_init+0xe/0x1b3
[    0.057000]  ? rest_init+0x156/0x156
[    0.057000]  ret_from_fork+0x35/0x40
[    0.058382] node 0 initialised, 0 pages in 0ms
[    0.059079] pgdatinit0 (12) used greatest stack depth: 30272 bytes left
[    0.061285] devtmpfs: initialized
[    0.066273] gcov: version magic: 0x4137332a
[    0.094475] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.095155] futex hash table entries: 256 (order: 3, 32768 bytes)
[    0.104040] NET: Registered protocol family 16
[    0.109641] audit: initializing netlink subsys (disabled)
[    0.114096] cpuidle: using governor menu
[    0.117157] ACPI: bus type PCI registered
[    0.118569] PCI: Using configuration type 1 for base access
[    0.120449] audit: type=2000 audit(1519774283.546:1): state=initialized audit_enabled=0 res=1
[    0.234918] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.237759] cryptd: max_cpu_qlen set to 1000
[    0.240431] ACPI: Added _OSI(Module Device)
[    0.240918] ACPI: Added _OSI(Processor Device)
[    0.241012] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.241547] ACPI: Added _OSI(Processor Aggregator Device)
[    0.287077] ACPI: Interpreter enabled
[    0.287864] ACPI: (supports S0 S3 S5)
[    0.288013] ACPI: Using IOAPIC for interrupt routing
[    0.289315] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.296964] ACPI: Enabled 2 GPEs in block 00 to 0F
[    0.513386] swapper/0 invoked oom-killer: gfp_mask=0x14002c0(GFP_KERNEL|__GFP_NOWARN), nodemask=(null), order=2, oom_score_adj=0
[    0.514014] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G    B   W        4.16.0-rc2-00103-gdf2af62 #1
[    0.514979] Call Trace:
[    0.515000]  dump_stack+0x14b/0x22d
[    0.515000]  ? arch_local_irq_restore+0x16/0x16
[    0.515000]  dump_header+0x1bf/0x7f4
[    0.515000]  ? global_node_page_state+0xfd/0xfd
[    0.515000]  ? lock_release+0x769/0x7b1
[    0.515000]  ? rcu_read_unlock+0x43/0x43
[    0.515000]  ? rcu_read_lock+0x51/0x51
[    0.515000]  ? reacquire_held_locks+0x1a5/0x1a5
[    0.515000]  ? lock_acquire+0xf1/0x15b
[    0.515000]  ? mark_oom_victim+0x15e/0x15e
[    0.515000]  ? lock_acquire+0x148/0x15b
[    0.515000]  out_of_memory+0xdf2/0xeee
[    0.515000]  ? cpumask_next+0x53/0x5d
[    0.515000]  ? unregister_oom_notifier+0x1e/0x1e
[    0.515000]  ? lock_acquire+0xf1/0x15b
[    0.515000]  ? lock_acquire+0x148/0x15b
[    0.515000]  __alloc_pages_slowpath+0x130e/0x184d
[    0.515000]  ? __alloc_pages_cpuset_fallback+0x4f/0x4f
[    0.515000]  ? stack_access_ok+0x16/0x76
[    0.515000]  ? deref_stack_reg+0xc2/0x158
[    0.515000]  ? stack_access_ok+0x16/0x76
[    0.515000]  ? __free_pages+0x43/0x43
[    0.515000]  ? deref_stack_reg+0xc2/0x158
[    0.515000]  ? stack_access_ok+0x16/0x76
[    0.515000]  ? stack_access_ok+0x16/0x76
[    0.515000]  ? deref_stack_reg+0xc2/0x158
[    0.515000]  ? in_sched_functions+0x54/0x54
[    0.515000]  ? fs_reclaim_release+0x10/0x37
[    0.515000]  ? __might_sleep+0x190/0x1a3
[    0.515000]  __alloc_pages_nodemask+0x50b/0x586
[    0.515000]  ? __alloc_pages_slowpath+0x184d/0x184d
[    0.515000]  ? ret_from_fork+0x34/0x40
[    0.515000]  ? ret_from_fork+0x34/0x40
[    0.515000]  ? unwind_next_frame+0x374/0x14f3
[    0.515000]  __alloc_pages+0xe/0x16
[    0.515000]  alloc_page_interleave+0x12/0x12d
[    0.515000]  alloc_pages_current+0x9d/0xf6
[    0.515000]  depot_save_stack+0x1c8/0x484
[    0.515000]  save_stack+0x100/0x110
[    0.515000]  ? save_stack+0x37/0x110
[    0.515000]  ? set_track+0x23/0x2f
[    0.515000]  ? kasan_kmalloc+0xa9/0xbb
[    0.515000]  ? __kmalloc+0x18e/0x1bc
[    0.515000]  ? acpi_os_allocate_zeroed+0x4c/0x5b
[    0.515000]  ? acpi_ut_execute_CID+0x237/0x4c8
[    0.515000]  ? acpi_get_object_info+0x3f8/0xc8c
[    0.515000]  ? acpi_init_device_object+0x7c2/0x1678
[    0.515000]  ? acpi_add_single_object+0x24c/0x156c
[    0.515000]  ? acpi_bus_check_add+0x549/0x864
[    0.515000]  ? acpi_ns_walk_namespace+0x1a4/0x35b
[    0.515000]  ? acpi_walk_namespace+0xd5/0x112
[    0.515000]  ? acpi_bus_scan+0xc5/0x14a
[    0.515000]  ? acpi_scan_init+0x49e/0xc57


To reproduce:

        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,
Shun

View attachment "config-4.16.0-rc2-00103-gdf2af62" of type "text/plain" (116245 bytes)

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ