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-next>] [day] [month] [year] [list]
Message-ID: <20211227150535.GA16252@xsang-OptiPlex-9020>
Date:   Mon, 27 Dec 2021 23:05:35 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Michael Kelley <mikelley@...rosoft.com>,
        Nishanth Menon <nm@...com>, Jason Gunthorpe <jgg@...dia.com>,
        LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        lkp@...ts.01.org, lkp@...el.com
Subject: [genirq/msi]  495c66aca3:
 BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/mutex.c



Greeting,

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

commit: 495c66aca3da704e063fa373fdbe371e71d3f4ee ("genirq/msi: Convert to new functions")
https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git irq/msi

in testcase: xfstests
version: xfstests-x86_64-972d710-1_20211221
with following parameters:

	disk: 4HDD
	fs: xfs
	test: xfs-group-14
	ucode: 0x21

test-description: xfstests is a regression test suite for xfs and other files ystems.
test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git


on test machine: 4 threads 1 sockets Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz with 8G 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 <oliver.sang@...el.com>


kern  :err   : [  126.209306] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:280
kern  :err   : [  126.209308] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 5183, name: ls
kern  :err   : [  126.209311] preempt_count: 2, expected: 0
kern  :warn  : [  126.209312] CPU: 2 PID: 5183 Comm: ls Not tainted 5.16.0-rc5-00091-g495c66aca3da #1
kern  :warn  : [  126.209315] Hardware name: Hewlett-Packard HP Pro 3340 MT/17A1, BIOS 8.07 01/24/2013
kern  :warn  : [  126.209316] Call Trace:
kern  :warn  : [  126.209318]  <TASK>
kern :warn : [  126.209319] dump_stack_lvl (lib/dump_stack.c:107) 
kern :warn : [  126.209323] __might_resched.cold (kernel/sched/core.c:9539 kernel/sched/core.c:9492) 
kern :warn : [  126.209326] ? kasan_unpoison (mm/kasan/shadow.c:108 mm/kasan/shadow.c:142) 
kern :warn : [  126.209330] mutex_lock (kernel/locking/mutex.c:280) 
kern :warn : [  126.209335] ? __mutex_lock_slowpath (kernel/locking/mutex.c:279) 
kern :warn : [  126.209339] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:202 include/linux/atomic/atomic-instrumented.h:513 include/asm-generic/qspinlock.h:82 include/linux/spinlock.h:185 include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162) 
kern :warn : [  126.209342] ? _raw_read_unlock_irqrestore (kernel/locking/spinlock.c:161) 
kern :warn : [  126.209344] msi_get_virq (kernel/irq/msi.c:332) 
kern :warn : [  126.209349] pci_irq_vector (drivers/pci/msi/msi.c:1085 drivers/pci/msi/msi.c:1077) 
kern :warn : [  126.209354] rtl8169_netpoll (drivers/net/ethernet/realtek/r8169_main.c:4722) 
kern :warn : [  126.209358] netpoll_poll_dev (net/core/netpoll.c:166 net/core/netpoll.c:195) 
kern :warn : [  126.209363] netpoll_send_skb (net/core/netpoll.c:350 net/core/netpoll.c:376) 
kern :warn : [  126.209367] write_msg (drivers/net/netconsole.c:862 drivers/net/netconsole.c:836) netconsole
kern :warn : [  126.209372] console_unlock (kernel/printk/printk.c:1929 kernel/printk/printk.c:2711) 
kern :warn : [  126.209375] ? do_syslog (kernel/printk/printk.c:2088) 
kern :warn : [  126.209378] ? prb_read_valid (kernel/printk/printk_ringbuffer.c:1928) 
kern :warn : [  126.209382] vprintk_emit (arch/x86/include/asm/preempt.h:85 kernel/printk/printk.c:2246) 
kern :warn : [  126.209384] ? unwind_next_frame (arch/x86/kernel/unwind_orc.c:600) 
kern :warn : [  126.209388] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.209502] _printk (kernel/printk/printk.c:2261) 
kern :warn : [  126.209505] ? record_print_text.cold (kernel/printk/printk.c:2261) 
kern :warn : [  126.209508] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.209621] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.209734] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.209851] ? __module_text_address (kernel/module.c:4768) 
kern :warn : [  126.209856] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.209968] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.210080] show_trace_log_lvl (arch/x86/kernel/dumpstack.c:284) 
kern :warn : [  126.210084] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.210197] ? xfs_dir2_sf_getdents+0x728/0xb40 xfs
kern :warn : [  126.210309] dump_stack_lvl (lib/dump_stack.c:107) 
kern :warn : [  126.210313] xfs_corruption_error (fs/xfs/xfs_error.c:339 fs/xfs/xfs_error.c:324 fs/xfs/xfs_error.c:354) xfs
kern :warn : [  126.210425] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.210536] ? __alloc_pages_slowpath+0x1f80/0x1f80 
kern :warn : [  126.210541] xfs_dir2_sf_getdents+0x728/0xb40 xfs
kern :warn : [  126.210653] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.210764] ? __mod_memcg_lruvec_state (arch/x86/include/asm/atomic.h:95 include/linux/atomic/atomic-instrumented.h:182 mm/memcontrol.c:636 mm/memcontrol.c:632 mm/memcontrol.c:708) 
kern :warn : [  126.210769] xfs_readdir (fs/xfs/xfs_dir2_readdir.c:526) xfs
kern :warn : [  126.210884] ? do_anonymous_page (mm/memory.c:3800) 
kern :warn : [  126.210889] ? xfs_dir3_get_dtype (fs/xfs/xfs_dir2_readdir.c:508) xfs
kern :warn : [  126.211001] ? make_kgid (kernel/user_namespace.c:463) 
kern :warn : [  126.211006] ? xfs_vn_getattr (fs/xfs/xfs_iops.c:593) xfs
kern :warn : [  126.211121] ? security_file_permission (arch/x86/include/asm/atomic64_64.h:22 include/linux/atomic/atomic-long.h:29 include/linux/atomic/atomic-instrumented.h:1184 include/linux/fsnotify.h:62 include/linux/fsnotify.h:99 include/linux/fsnotify.h:124 include/linux/fsnotify.h:103 security/security.c:1511) 
kern :warn : [  126.211125] iterate_dir (fs/readdir.c:65) 
kern :warn : [  126.211130] __x64_sys_getdents64 (fs/readdir.c:370 fs/readdir.c:354 fs/readdir.c:354) 
kern :warn : [  126.211133] ? filldir (fs/readdir.c:354) 
kern :warn : [  126.211135] ? handle_mm_fault (mm/memory.c:4784) 
kern :warn : [  126.211138] ? __ia32_sys_getdents64 (fs/readdir.c:312) 
kern :warn : [  126.211141] ? do_user_addr_fault (arch/x86/mm/fault.c:1423) 
kern :warn : [  126.211144] ? exit_to_user_mode_prepare (arch/x86/include/asm/entry-common.h:58 kernel/entry/common.c:209) 
kern :warn : [  126.211148] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
kern :warn : [  126.211153] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113) 
kern  :warn  : [  126.211156] RIP: 0033:0x7f82c632edd7
kern :warn : [ 126.211159] Code: 00 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 20 c3 66 2e 0f 1f 84 00 00 00 00 00 90 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 89 90 0f 00 f7 d8 64 89 02 48
All code
========
   0:	00 00                	add    %al,(%rax)
   2:	48 83 c4 08          	add    $0x8,%rsp
   6:	5b                   	pop    %rbx
   7:	5d                   	pop    %rbp
   8:	c3                   	retq   
   9:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  10:	00 00 00 
  13:	48 8b 47 20          	mov    0x20(%rdi),%rax
  17:	c3                   	retq   
  18:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  1f:	00 00 00 
  22:	90                   	nop
  23:	b8 d9 00 00 00       	mov    $0xd9,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax		<-- trapping instruction
  30:	77 01                	ja     0x33
  32:	c3                   	retq   
  33:	48 8b 15 89 90 0f 00 	mov    0xf9089(%rip),%rdx        # 0xf90c3
  3a:	f7 d8                	neg    %eax
  3c:	64 89 02             	mov    %eax,%fs:(%rdx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax
   6:	77 01                	ja     0x9
   8:	c3                   	retq   
   9:	48 8b 15 89 90 0f 00 	mov    0xf9089(%rip),%rdx        # 0xf9099
  10:	f7 d8                	neg    %eax
  12:	64 89 02             	mov    %eax,%fs:(%rdx)
  15:	48                   	rex.W
kern  :warn  : [  126.211162] RSP: 002b:00007ffd9859b988 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
kern  :warn  : [  126.211166] RAX: ffffffffffffffda RBX: 0000562c94087960 RCX: 00007f82c632edd7
kern  :warn  : [  126.211168] RDX: 0000000000008000 RSI: 0000562c94087990 RDI: 0000000000000003
kern  :warn  : [  126.211170] RBP: 0000562c94087990 R08: 0000000000000003 R09: 0000000000000078
kern  :warn  : [  126.211172] R10: fffffffffffff5e9 R11: 0000000000000246 R12: fffffffffffffe98
kern  :warn  : [  126.211174] R13: 0000000000000000 R14: 0000562c94087930 R15: 0000562c921bf8c1
kern  :warn  : [  126.211176]  </TASK>
kern :warn : [  126.606948] ? __alloc_pages_slowpath+0x1f80/0x1f80 
kern :warn : [  126.613666] xfs_dir2_sf_getdents+0x728/0xb40 xfs
kern :warn : [  126.620046] ? xfs_dir2_sf_getdents+0x6e1/0xb40 xfs
kern :warn : [  126.626623] ? __mod_memcg_lruvec_state (arch/x86/include/asm/atomic.h:95 include/linux/atomic/atomic-instrumented.h:182 mm/memcontrol.c:636 mm/memcontrol.c:632 mm/memcontrol.c:708) 
kern :warn : [  126.632281] xfs_readdir (fs/xfs/xfs_dir2_readdir.c:526) xfs
kern :warn : [  126.637258] ? do_anonymous_page (mm/memory.c:3800) 
kern :warn : [  126.642395] ? xfs_dir3_get_dtype (fs/xfs/xfs_dir2_readdir.c:508) xfs
kern :warn : [  126.647995] ? make_kgid (kernel/user_namespace.c:463) 
kern :warn : [  126.652155] ? xfs_vn_getattr (fs/xfs/xfs_iops.c:593) xfs
kern :warn : [  126.657573] ? security_file_permission (arch/x86/include/asm/atomic64_64.h:22 include/linux/atomic/atomic-long.h:29 include/linux/atomic/atomic-instrumented.h:1184 include/linux/fsnotify.h:62 include/linux/fsnotify.h:99 include/linux/fsnotify.h:124 include/linux/fsnotify.h:103 security/security.c:1511) 
kern :warn : [  126.663239] iterate_dir (fs/readdir.c:65) 
kern :warn : [  126.667598] __x64_sys_getdents64 (fs/readdir.c:370 fs/readdir.c:354 fs/readdir.c:354) 
kern :warn : [  126.672756] ? filldir (fs/readdir.c:354) 
kern :warn : [  126.676940] ? handle_mm_fault (mm/memory.c:4784) 
kern :warn : [  126.681806] ? __ia32_sys_getdents64 (fs/readdir.c:312) 
kern :warn : [  126.687177] ? do_user_addr_fault (arch/x86/mm/fault.c:1423) 
kern :warn : [  126.692697] ? exit_to_user_mode_prepare (arch/x86/include/asm/entry-common.h:58 kernel/entry/common.c:209) 
kern :warn : [  126.698444] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
kern :warn : [  126.702804] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113) 
kern  :warn  : [  126.708653] RIP: 0033:0x7f82c632edd7
kern :warn : [ 126.713002] Code: 00 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 20 c3 66 2e 0f 1f 84 00 00 00 00 00 90 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 89 90 0f 00 f7 d8 64 89 02 48
All code
========
   0:	00 00                	add    %al,(%rax)
   2:	48 83 c4 08          	add    $0x8,%rsp
   6:	5b                   	pop    %rbx
   7:	5d                   	pop    %rbp
   8:	c3                   	retq   
   9:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  10:	00 00 00 
  13:	48 8b 47 20          	mov    0x20(%rdi),%rax
  17:	c3                   	retq   
  18:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  1f:	00 00 00 
  22:	90                   	nop
  23:	b8 d9 00 00 00       	mov    $0xd9,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax		<-- trapping instruction
  30:	77 01                	ja     0x33
  32:	c3                   	retq   
  33:	48 8b 15 89 90 0f 00 	mov    0xf9089(%rip),%rdx        # 0xf90c3
  3a:	f7 d8                	neg    %eax
  3c:	64 89 02             	mov    %eax,%fs:(%rdx)
  3f:	48                   	rex.W

Code starting with the faulting instruction
===========================================
   0:	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax
   6:	77 01                	ja     0x9
   8:	c3                   	retq   
   9:	48 8b 15 89 90 0f 00 	mov    0xf9089(%rip),%rdx        # 0xf9099
  10:	f7 d8                	neg    %eax
  12:	64 89 02             	mov    %eax,%fs:(%rdx)
  15:	48                   	rex.W


To reproduce:

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        sudo bin/lkp install job.yaml           # job file is attached in this email
        bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
        sudo bin/lkp run generated-yaml-file

        # 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.16.0-rc5-00091-g495c66aca3da" of type "text/plain" (177842 bytes)

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

Download attachment "kmsg.xz" of type "application/x-xz" (27904 bytes)

View attachment "xfstests" of type "text/plain" (1690 bytes)

View attachment "job.yaml" of type "text/plain" (4895 bytes)

View attachment "reproduce" of type "text/plain" (885 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ