Hello, kernel test robot noticed "WARNING:at_kernel/sched/core.c:#__might_sleep" on: commit: b4f239c91f9bf643f3e5f0977c9eff2c809eeddd ("netfs: Change the read result collector to only use one work item") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master in testcase: xfstests version: xfstests-x86_64-8467552f-1_20241215 with following parameters: disk: 4HDD fs: ext4 fs2: smbv3 test: generic-465 config: x86_64-rhel-9.4-func compiler: gcc-12 test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (Skylake) with 32G memory (please refer to attached dmesg/kmsg for entire log/backtrace) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-lkp/202412311337.146bcde4-lkp@xxxxxxxxx [ 339.815767][ T1923] ------------[ cut here ]------------ [ 339.821125][ T1923] do not call blocking ops when !TASK_RUNNING; state=2 set at prepare_to_wait (kernel/sched/wait.c:237 (discriminator 3)) [ 339.832728][ T1923] WARNING: CPU: 1 PID: 1923 at kernel/sched/core.c:8681 __might_sleep (kernel/sched/core.c:8681 (discriminator 9)) [ 339.841830][ T1923] Modules linked in: nls_utf8 cifs cifs_arc4 nls_ucs2_utils rdma_cm iw_cm ib_cm ib_core cifs_md4 dns_resolver ext4 mbcache jbd2 snd_hda_codec_hdmi snd_ctl_led snd_hda_codec_realtek snd_hda_codec_generic snd_hda_scodec_component btrfs blake2b_generic xor zstd_compress intel_rapl_msr intel_rapl_common raid6_pq libcrc32c snd_soc_avs snd_soc_hda_codec snd_hda_ext_core x86_pkg_temp_thermal snd_soc_core intel_powerclamp coretemp snd_compress sd_mod sg kvm_intel ipmi_devintf snd_hda_intel dell_pc ipmi_msghandler i915 platform_profile snd_intel_dspcfg snd_intel_sdw_acpi kvm snd_hda_codec snd_hda_core snd_hwdep cec crct10dif_pclmul intel_gtt crc32_pclmul crc32c_intel drm_buddy ghash_clmulni_intel snd_pcm dell_wmi ttm mei_wdt rapl drm_display_helper rfkill ahci snd_timer dell_smbios intel_cstate wmi_bmof sparse_keymap dell_wmi_descriptor dcdbas intel_uncore drm_kms_helper libahci pcspkr snd i2c_i801 mei_me soundcore libata i2c_smbus intel_pch_thermal mei intel_pmc_core intel_vsec video pmt_telemetry pmt_class acpi_pad [ 339.842057][ T1923] wmi binfmt_misc loop fuse drm dm_mod ip_tables [ 339.939708][ T1923] CPU: 1 UID: 0 PID: 1923 Comm: aio-dio-append- Not tainted 6.13.0-rc1-00025-gb4f239c91f9b #1 [ 339.949872][ T1923] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.8.1 12/05/2017 [ 339.958025][ T1923] RIP: 0010:__might_sleep (kernel/sched/core.c:8681 (discriminator 9)) [ 339.963323][ T1923] Code: 00 d4 7e 49 8d bd 60 14 00 00 48 89 fa 48 c1 ea 03 80 3c 02 00 75 34 49 8b 95 60 14 00 00 48 c7 c7 e0 c3 0c 84 e8 09 7b f4 ff <0f> 0b e9 75 ff ff ff e8 2d f2 88 00 e9 26 ff ff ff 89 75 e0 e8 40 All code ======== 0: 00 d4 add %dl,%ah 2: 7e 49 jle 0x4d 4: 8d bd 60 14 00 00 lea 0x1460(%rbp),%edi a: 48 89 fa mov %rdi,%rdx d: 48 c1 ea 03 shr $0x3,%rdx 11: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 15: 75 34 jne 0x4b 17: 49 8b 95 60 14 00 00 mov 0x1460(%r13),%rdx 1e: 48 c7 c7 e0 c3 0c 84 mov $0xffffffff840cc3e0,%rdi 25: e8 09 7b f4 ff call 0xfffffffffff47b33 2a:* 0f 0b ud2 <-- trapping instruction 2c: e9 75 ff ff ff jmp 0xffffffffffffffa6 31: e8 2d f2 88 00 call 0x88f263 36: e9 26 ff ff ff jmp 0xffffffffffffff61 3b: 89 75 e0 mov %esi,-0x20(%rbp) 3e: e8 .byte 0xe8 3f: 40 rex Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: e9 75 ff ff ff jmp 0xffffffffffffff7c 7: e8 2d f2 88 00 call 0x88f239 c: e9 26 ff ff ff jmp 0xffffffffffffff37 11: 89 75 e0 mov %esi,-0x20(%rbp) 14: e8 .byte 0xe8 15: 40 rex [ 339.982956][ T1923] RSP: 0018:ffffc90002d3f798 EFLAGS: 00010282 [ 339.988937][ T1923] RAX: 0000000000000000 RBX: ffffffff84253280 RCX: ffffffff823b6e6a [ 339.996823][ T1923] RDX: 1ffff110f1016b08 RSI: 0000000000000008 RDI: ffff8887880b5840 [ 340.004710][ T1923] RBP: ffffc90002d3f7c0 R08: 0000000000000001 R09: fffff520005a7ea9 [ 340.012599][ T1923] R10: ffffc90002d3f54f R11: 0000000000000001 R12: 000000000000004a [ 340.020486][ T1923] R13: ffff888802980000 R14: ffff8881bb73d200 R15: ffff888803320780 [ 340.028386][ T1923] FS: 00007fcb283696c0(0000) GS:ffff888788080000(0000) knlGS:0000000000000000 [ 340.037235][ T1923] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 340.040226][ T284] 512+0 records in [ 340.043725][ T1923] CR2: 000055b5dc091000 CR3: 0000000199d80002 CR4: 00000000003726f0 [ 340.043728][ T1923] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 340.043756][ T284] [ 340.047339][ T1923] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 340.047341][ T1923] Call Trace: [ 340.076359][ T1923] <TASK> [ 340.079196][ T1923] ? __warn (kernel/panic.c:748) [ 340.083179][ T1923] ? __might_sleep (kernel/sched/core.c:8681 (discriminator 9)) [ 340.087827][ T1923] ? report_bug (lib/bug.c:180 lib/bug.c:219) [ 340.092232][ T1923] ? handle_bug (arch/x86/kernel/traps.c:285) [ 340.096456][ T1923] ? exc_invalid_op (arch/x86/kernel/traps.c:309 (discriminator 1)) [ 340.101033][ T1923] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) [ 340.105958][ T1923] ? llist_add_batch (lib/llist.c:33 (discriminator 14)) [ 340.110724][ T1923] ? __might_sleep (kernel/sched/core.c:8681 (discriminator 9)) [ 340.115371][ T1923] ? __might_sleep (kernel/sched/core.c:8681 (discriminator 9)) [ 340.120036][ T1923] netfs_retry_reads (include/linux/kernel.h:73 (discriminator 3) include/linux/wait_bit.h:74 (discriminator 3) fs/netfs/read_retry.c:263 (discriminator 3)) [ 340.124803][ T1923] netfs_collect_read_results (fs/netfs/read_collect.c:334) [ 340.130600][ T1923] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:107 include/linux/atomic/atomic-arch-fallback.h:2170 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162) [ 340.135875][ T1923] ? __pfx_netfs_collect_read_results (fs/netfs/read_collect.c:186) [ 340.142022][ T1923] netfs_read_collection (include/linux/instrumented.h:68 include/asm-generic/bitops/instrumented-non-atomic.h:141 fs/netfs/read_collect.c:419) [ 340.147122][ T1923] netfs_wait_for_read (include/linux/instrumented.h:68 include/asm-generic/bitops/instrumented-non-atomic.h:141 fs/netfs/read_collect.c:631) [ 340.152138][ T1923] ? __pfx_netfs_wait_for_read (fs/netfs/read_collect.c:614) [ 340.157674][ T1923] ? __pfx_autoremove_wake_function (kernel/sched/wait.c:383) [ 340.163632][ T1923] ? netfs_dispatch_unbuffered_reads+0x138/0xd50 [ 340.170477][ T1923] netfs_unbuffered_read_iter_locked (fs/netfs/direct_read.c:231) [ 340.176714][ T1923] netfs_unbuffered_read_iter (fs/netfs/direct_read.c:267) [ 340.177517][ T284] 512+0 records out [ 340.182157][ T1923] vfs_read (fs/read_write.c:484 fs/read_write.c:565) [ 340.182188][ T284] [ 340.185861][ T1923] ? vfs_read (fs/read_write.c:484 fs/read_write.c:565) [ 340.196303][ T1923] ? __pfx_vfs_read (fs/read_write.c:546) [ 340.200862][ T1923] ? rseq_ip_fixup (kernel/rseq.c:257 kernel/rseq.c:291) [ 340.205534][ T1923] ? fdget (include/linux/file.h:57 fs/file.c:1154 fs/file.c:1159) [ 340.209505][ T1923] __x64_sys_pread64 (fs/read_write.c:756 fs/read_write.c:764 fs/read_write.c:761 fs/read_write.c:761) [ 340.214348][ T1923] ? __pfx___x64_sys_pread64 (fs/read_write.c:761) [ 340.219717][ T1923] ? __x64_sys_pread64 (fs/read_write.c:761) [ 340.224719][ T1923] ? __pfx___x64_sys_pread64 (fs/read_write.c:761) [ 340.230090][ T1923] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) [ 340.234490][ T1923] ? do_syscall_64 (arch/x86/entry/common.c:102) [ 340.239062][ T1923] ? _raw_spin_lock_irq (arch/x86/include/asm/atomic.h:107 include/linux/atomic/atomic-arch-fallback.h:2170 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:120 kernel/locking/spinlock.c:170) [ 340.243988][ T1923] ? __handle_mm_fault (mm/memory.c:5944) [ 340.249100][ T1923] ? __pfx___handle_mm_fault (mm/memory.c:5853) [ 340.254462][ T1923] ? __count_memcg_events (mm/memcontrol.c:583 mm/memcontrol.c:857) [ 340.259735][ T1923] ? handle_mm_fault (mm/memory.c:5986 mm/memory.c:6138) [ 340.264575][ T1923] ? do_user_addr_fault (include/linux/rcupdate.h:882 include/linux/mm.h:741 arch/x86/mm/fault.c:1340) [ 340.269673][ T1923] ? exc_page_fault (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 arch/x86/mm/fault.c:1489 arch/x86/mm/fault.c:1539) [ 340.274250][ T1923] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) [ 340.280045][ T1923] RIP: 0033:0x7fcb28667387 [ 340.284360][ T1923] Code: 08 89 3c 24 48 89 4c 24 18 e8 b5 f4 f8 ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 11 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 05 f5 f8 ff 48 8b All code ======== 0: 08 89 3c 24 48 89 or %cl,-0x76b7dbc4(%rcx) 6: 4c 24 18 rex.WR and $0x18,%al 9: e8 b5 f4 f8 ff call 0xfffffffffff8f4c3 e: 4c 8b 54 24 18 mov 0x18(%rsp),%r10 13: 48 8b 54 24 10 mov 0x10(%rsp),%rdx 18: 41 89 c0 mov %eax,%r8d 1b: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 20: 8b 3c 24 mov (%rsp),%edi 23: b8 11 00 00 00 mov $0x11,%eax 28: 0f 05 syscall 2a:* 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax <-- trapping instruction 30: 77 31 ja 0x63 32: 44 89 c7 mov %r8d,%edi 35: 48 89 04 24 mov %rax,(%rsp) 39: e8 05 f5 f8 ff call 0xfffffffffff8f543 3e: 48 rex.W 3f: 8b .byte 0x8b Code starting with the faulting instruction =========================================== 0: 48 3d 00 f0 ff ff cmp $0xfffffffffffff000,%rax 6: 77 31 ja 0x39 8: 44 89 c7 mov %r8d,%edi b: 48 89 04 24 mov %rax,(%rsp) f: e8 05 f5 f8 ff call 0xfffffffffff8f519 14: 48 rex.W 15: 8b .byte 0x8b The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20241231/202412311337.146bcde4-lkp@xxxxxxxxx -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki