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]
Date:   Thu, 16 Dec 2021 21:01:02 +0800
From:   kernel test robot <oliver.sang@...el.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     0day robot <lkp@...el.com>, LKML <linux-kernel@...r.kernel.org>,
        lkp@...ts.01.org, willy@...radead.org, akpm@...ux-foundation.org,
        hannes@...xchg.org, mhocko@...nel.org, vdavydov.dev@...il.com,
        shakeelb@...gle.com, guro@...com, shy828301@...il.com,
        alexs@...nel.org, richard.weiyang@...il.com, david@...morbit.com,
        trond.myklebust@...merspace.com, anna.schumaker@...app.com,
        jaegeuk@...nel.org, chao@...nel.org, kari.argillander@...il.com,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-nfs@...r.kernel.org, zhengqi.arch@...edance.com,
        duanxiongchun@...edance.com, fam.zheng@...edance.com,
        smuchun@...il.com, Muchun Song <songmuchun@...edance.com>
Subject: [mm]  86cda95957:
 BUG:sleeping_function_called_from_invalid_context_at_include/linux/sched/mm.h



Greeting,

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

commit: 86cda9595796e709c444b93df1f27a2343c5fa06 ("[PATCH v4 11/17] mm: list_lru: allocate list_lru_one only when needed")
url: https://github.com/0day-ci/linux/commits/Muchun-Song/Optimize-list-lru-memory-consumption/20211214-010208
base: https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git dev-test
patch link: https://lore.kernel.org/linux-fsdevel/20211213165342.74704-12-songmuchun@bytedance.com

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

	disk: 4HDD
	fs: xfs
	test: xfs-reflink-25
	ucode: 0x28

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: 8 threads 1 sockets Intel(R) Core(TM) i7-4790 v3 @ 3.60GHz with 6G 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>


erial console /d[   14.815233][  T356] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:230
[   14.827152][  T356] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 356, name: useradd
[   14.835607][  T356] preempt_count: 1, expected: 0
[   14.840274][  T356] CPU: 4 PID: 356 Comm: useradd Not tainted 5.16.0-rc1-00032-g86cda9595796 #1
ev/ttyS0
[   14.848903][  T356] Hardware name: Dell Inc. OptiPlex 9020/03CPWF, BIOS A11 04/01/2015
[   14.857606][  T356] Call Trace:
[   14.860732][  T356]  <TASK>
[ 14.863515][ T356] dump_stack_lvl (lib/dump_stack.c:107) 
[ 14.867859][ T356] __might_resched.cold (kernel/sched/core.c:9543 kernel/sched/core.c:9496) 
[ 14.872889][ T356] ? memcg_list_lru_alloc (include/linux/slab.h:598 mm/list_lru.c:354 mm/list_lru.c:586) 
[ 14.878083][ T356] __kmalloc (include/linux/sched/mm.h:230 mm/slab.h:509 mm/slub.c:3148 mm/slub.c:3242 mm/slub.c:4433) 
[ 14.882177][ T356] ? is_bpf_text_address (arch/x86/include/asm/preempt.h:85 include/linux/rcupdate.h:73 include/linux/rcupdate.h:720 kernel/bpf/core.c:717) 
[ 14.887129][ T356] memcg_list_lru_alloc (include/linux/slab.h:598 mm/list_lru.c:354 mm/list_lru.c:586) 
[ 14.892166][ T356] ? xas_alloc (lib/xarray.c:374) 
[ 14.896421][ T356] kmem_cache_alloc_lru (include/linux/cgroup.h:403 mm/slab.h:295 mm/slab.h:514 mm/slub.c:3148 mm/slub.c:3242 mm/slub.c:3249 mm/slub.c:3266) 
[ 14.901367][ T356] xas_alloc (lib/xarray.c:374) 
[ 14.905454][ T356] xas_create (lib/xarray.c:676) 
[ 14.909624][ T356] xas_store (lib/xarray.c:784 (discriminator 6)) 
[ 14.913709][ T356] ? _raw_spin_lock_irq (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:120 kernel/locking/spinlock.c:170) 
[ 14.918567][ T356] ? xas_find_conflict (lib/xarray.c:1401) 
[ 14.923511][ T356] __filemap_add_folio (mm/filemap.c:943) 
[ 14.928458][ T356] ? folio_wait_private_2 (mm/filemap.c:891) 
[ 14.933664][ T356] ? scan_shadow_nodes (mm/workingset.c:435) 
[ 14.938436][ T356] ? __alloc_pages (mm/page_alloc.c:5370) 
[ 14.943038][ T356] ? __alloc_pages_slowpath+0x1f80/0x1f80 
[ 14.949620][ T356] filemap_add_folio (include/linux/instrumented.h:41 include/asm-generic/bitops/instrumented-non-atomic.h:42 include/linux/page-flags.h:417 mm/filemap.c:1001) 
[ 14.954311][ T356] ? add_to_page_cache_locked (mm/filemap.c:994) 
[ 14.959686][ T356] __filemap_get_folio (mm/filemap.c:1963) 
[ 14.964637][ T356] ? __folio_lock_killable (mm/filemap.c:1901) 
[ 14.969756][ T356] ? __vfs_setxattr (fs/xattr.c:391) 
[ 14.974449][ T356] ? inode_owner_or_capable (fs/inode.c:2291) 
[ 14.979826][ T356] pagecache_get_page (mm/folio-compat.c:125) 
[ 14.984516][ T356] simple_write_begin (fs/libfs.c:561) 
[ 14.989287][ T356] ? fault_in_iov_iter_readable (lib/iov_iter.c:460 lib/iov_iter.c:445) 
[ 14.994929][ T356] generic_perform_write (mm/filemap.c:3758) 
[ 15.000054][ T356] ? trace_event_raw_event_file_check_and_advance_wb_err (mm/filemap.c:3721) 
[ 15.007926][ T356] ? inode_update_time (fs/inode.c:1987) 
[ 15.012703][ T356] ? generic_write_checks (fs/read_write.c:1649) 
[ 15.017909][ T356] __generic_file_write_iter (mm/filemap.c:3884) 
[ 15.023376][ T356] generic_file_write_iter (include/linux/fs.h:789 mm/filemap.c:3916) 
[ 15.028586][ T356] ? _raw_spin_lock (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:134 kernel/locking/spinlock.c:154) 
[ 15.033201][ T356] new_sync_write (fs/read_write.c:504 (discriminator 1)) 
[ 15.037718][ T356] ? __check_object_size (mm/usercopy.c:240 mm/usercopy.c:286 mm/usercopy.c:256) 
[ 15.042839][ T356] ? new_sync_read (fs/read_write.c:493) 
[ 15.047445][ T356] ? kasan_set_track (mm/kasan/common.c:46) 
[ 15.052053][ T356] ? file_open_root (fs/open.c:1198) 
[ 15.056745][ T356] vfs_write (fs/read_write.c:590) 
[ 15.060837][ T356] ksys_write (fs/read_write.c:643) 
[ 15.064928][ T356] ? __ia32_sys_read (fs/read_write.c:633) 
[ 15.069536][ T356] ? __fget_light (arch/x86/include/asm/atomic.h:29 include/linux/atomic/atomic-instrumented.h:28 fs/file.c:959) 
[ 15.073970][ T356] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) 
[ 15.078234][ T356] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113) 
[   15.083962][  T356] RIP: 0033:0x7f4751044504
[ 15.088220][ T356] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 48 8d 05 f9 61 0d 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 49 89 d4 55 48 89 f5 53
All code
========
   0:	00 f7                	add    %dh,%bh
   2:	d8 64 89 02          	fsubs  0x2(%rcx,%rcx,4)
   6:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
   d:	eb b3                	jmp    0xffffffffffffffc2
   f:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
  16:	48 8d 05 f9 61 0d 00 	lea    0xd61f9(%rip),%rax        # 0xd6216
  1d:	8b 00                	mov    (%rax),%eax
  1f:	85 c0                	test   %eax,%eax
  21:	75 13                	jne    0x36
  23:	b8 01 00 00 00       	mov    $0x1,%eax
  28:	0f 05                	syscall 
  2a:*	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax		<-- trapping instruction
  30:	77 54                	ja     0x86
  32:	c3                   	retq   
  33:	0f 1f 00             	nopl   (%rax)
  36:	41 54                	push   %r12
  38:	49 89 d4             	mov    %rdx,%r12
  3b:	55                   	push   %rbp
  3c:	48 89 f5             	mov    %rsi,%rbp
  3f:	53                   	push   %rbx

Code starting with the faulting instruction
===========================================
   0:	48 3d 00 f0 ff ff    	cmp    $0xfffffffffffff000,%rax
   6:	77 54                	ja     0x5c
   8:	c3                   	retq   
   9:	0f 1f 00             	nopl   (%rax)
   c:	41 54                	push   %r12
   e:	49 89 d4             	mov    %rdx,%r12
  11:	55                   	push   %rbp
  12:	48 89 f5             	mov    %rsi,%rbp
  15:	53                   	push   %rbx
[   15.107521][  T356] RSP: 002b:00007ffcd1b45278 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[   15.115736][  T356] RAX: ffffffffffffffda RBX: 00007ffcd1b452b0 RCX: 00007f4751044504
[   15.123515][  T356] RDX: 0000000000000124 RSI: 00007ffcd1b45300 RDI: 000000000000000c
[   15.131295][  T356] RBP: 0000000000000442 R08: 0000000000000002 R09: 0000000000000000
[   15.139072][  T356] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffcd1b45300
[   15.146847][  T356] R13: 000000000000000c R14: 000000000004db48 R15: 0000000000000000
[   15.154633][  T356]  </TASK>
[   15.160137][  T231] scsi 0:0:0:0: Attached scsi generic sg0 type 0
Startin[   15.167839][  T231] scsi 2:0:0:0: Attached scsi generic sg1 type 0
[   15.193722][   T57] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[   15.195091][   T56] ata3.00: Enabling discard_zeroes_data
[   15.207674][   T57] sd 0:0:0:0: [sda] Write Protect is off
[   15.207701][   T57] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   15.207787][   T57] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.207851][   T56] sd 2:0:0:0: [sdb] 1562824368 512-byte logical blocks: (800 GB/745 GiB)
[   15.207866][   T56] sd 2:0:0:0: [sdb] 4096-byte physical blocks
[   15.207900][   T56] sd 2:0:0:0: [sdb] Write Protect is off
[   15.207910][   T56] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[   15.207960][   T56] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.269219][   T56] ata3.00: Enabling discard_zeroes_data
e command to reb[   15.290068][   T56] ata3.00: Enabling discard_zeroes_data
[   15.333302][   T57]  sda: sda1 sda2 sda3 sda4 sda5 sda6
[   15.474103][  T413] raid6: avx2x4   gen() 14302 MB/s
[   15.495104][  T413] raid6: avx2x4   xor()  3413 MB/s
[   15.516107][  T413] raid6: avx2x2   gen() 13976 MB/s
[   15.537110][  T413] raid6: avx2x2   xor() 14885 MB/s
[   15.558107][  T413] raid6: avx2x1   gen() 11717 MB/s
[   15.579110][  T413] raid6: avx2x1   xor() 11126 MB/s
[   15.600107][  T413] raid6: sse2x4   gen()  9496 MB/s
[   15.621109][  T413] raid6: sse2x4   xor()  2777 MB/s
[   15.642108][  T413] raid6: sse2x2   gen()  9889 MB/s
[   15.663109][  T413] raid6: sse2x2   xor()  9114 MB/s
[   15.684104][  T413] raid6: sse2x1   gen()  8027 MB/s
[   15.705106][  T413] raid6: sse2x1   xor()  6892 MB/s
[   15.710054][  T413] raid6: using algorithm avx2x4 gen() 14302 MB/s
[   15.716224][  T413] raid6: .... xor() 3413 MB/s, rmw enabled
[   15.721887][  T413] raid6: using avx2x2 recovery algorithm
[   15.729474][  T413] xor: automatically using best checksumming function   avx
[   15.867090][  T472] IPMI message handler: version 39.2
[   15.875744][  T472] ipmi device interface
[   15.883698][  T413] Btrfs loaded, crc32c=crc32c-intel, zoned=yes, fsverity=no
[   15.892425][  T242] BTRFS: device fsid 3d7007c8-874e-4961-914f-c38ddb1e40d8 devid 1 transid 8599 /dev/sdb2 scanned by systemd-udevd (242)
[   15.909086][  T487] ipmi_si: IPMI System Interface driver
[   15.915587][  T487] ipmi_si: Unable to find any System Interface(s)
See 'systemctl status openipmi.service' for details.
[   16.356154][    C3] random: crng init done
[   16.360258][    C3] random: 1 urandom warning(s) missed due to ratelimiting
[   20.465582][  T334] Kernel tests: Boot OK!
[   20.465592][  T334]
[   23.872773][  T334] install debs round one: dpkg -i --force-confdef --force-depends /opt/deb/ntpdate_1%3a4.2.8p12+dfsg-4_amd64.deb
[   23.872784][  T334]
[   23.887308][  T334] /opt/deb/gawk_1%3a4.2.1+dfsg-1_amd64.deb
[   23.887314][  T334]
[   23.895838][  T334] /opt/deb/libssl1.1_1.1.1d-0+deb10u7_amd64.deb
[   23.895843][  T334]
[   23.904753][  T334] /opt/deb/uuid-runtime_2.33.1-0.1_amd64.deb
[   23.904758][  T334]
[   23.913322][  T334] /opt/deb/attr_1%3a2.4.48-4_amd64.deb
[   23.913326][  T334]
[   23.921362][  T334] /opt/deb/libdpkg-perl_1.19.7_all.deb
[   23.921367][  T334]
[   23.929463][  T334] /opt/deb/patch_2.7.6-3+deb10u1_amd64.deb


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-rc1-00032-g86cda9595796" of type "text/plain" (177692 bytes)

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

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

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

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ