public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [linus:master] [fs]  bc986b1d75: Kernel_panic-not_syncing:softlockup:hung_tasks
@ 2025-09-30  6:41 kernel test robot
  2025-09-30 23:29 ` [PATCH] f2fs: don't call iput() from f2fs_drop_inode() Mateusz Guzik
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2025-09-30  6:41 UTC (permalink / raw)
  To: Josef Bacik
  Cc: oe-lkp, lkp, linux-kernel, Christian Brauner, linux-f2fs-devel,
	gfs2, ltp, oliver.sang



Hello,

kernel test robot noticed "Kernel_panic-not_syncing:softlockup:hung_tasks" on:

commit: bc986b1d756482a5ec2d7d9625229d9b9df95ae1 ("fs: stop accessing ->i_count directly in f2fs and gfs2")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master


in testcase: ltp
version: ltp-x86_64-220f579cd-1_20250920
with following parameters:

	disk: 1HDD
	fs: f2fs
	test: fs_readonly-03



config: x86_64-rhel-9.4-ltp
compiler: gcc-14
test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Haswell) with 16G 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@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202509301450.138b448f-lkp@intel.com



watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [f2fs_ckpt-8:17:5378]
Modules linked in: dm_mod f2fs binfmt_misc snd_hda_codec_intelhdmi snd_hda_codec_hdmi btrfs blake2b_generic intel_rapl_msr xor intel_rapl_common zstd_compress x86_pkg_temp_thermal intel_powerclamp raid6_pq coretemp platform_profile i915 sd_mod sg kvm_intel snd_hda_codec_alc269 snd_hda_scodec_component snd_hda_codec_realtek_lib dell_wmi snd_hda_codec_generic intel_gtt dell_smbios snd_hda_intel kvm drm_buddy dell_wmi_descriptor snd_hda_codec sparse_keymap snd_hda_core irqbypass ahci rfkill ghash_clmulni_intel ttm snd_intel_dspcfg drm_display_helper rapl snd_intel_sdw_acpi libahci snd_hwdep i2c_i801 dcdbas mei_wdt intel_cstate cec lpc_ich snd_pcm i2c_smbus libata drm_client_lib intel_uncore mei_me snd_timer pcspkr drm_kms_helper snd mei soundcore video wmi drm fuse nfnetlink
CPU: 0 UID: 0 PID: 5378 Comm: f2fs_ckpt-8:17 Tainted: G S                  6.17.0-rc1-00015-gbc986b1d7564 #1 PREEMPT(voluntary) 
Tainted: [S]=CPU_OUT_OF_SPEC
Hardware name: Dell Inc. OptiPlex 9020/0DNKMN, BIOS A05 12/05/2013
RIP: 0010:native_queued_spin_lock_slowpath+0x704/0xad0
Code: 66 85 c0 74 39 48 b8 00 00 00 00 00 fc ff df 49 89 df 49 89 de 49 c1 ef 03 41 83 e6 07 49 01 c7 41 83 c6 03 f3 90 41 0f b6 07 <41> 38 c6 7c 08 84 c0 0f 85 5d 02 00 00 8b 03 66 85 c0 75 e6 89 44
RSP: 0018:ffffc90001a4f890 EFLAGS: 00000202
RAX: 0000000000000000 RBX: ffff88810d440080 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88810d440082
RBP: ffff88836da42200 R08: 0000000000000001 R09: ffffed1021a88010
R10: ffff88810d440083 R11: 0000000000000000 R12: 1ffff92000349f14
R13: 0000000000040000 R14: 0000000000000003 R15: ffffed1021a88010
FS:  0000000000000000(0000) GS:ffff8883e693e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f99f429e0f0 CR3: 000000041b872002 CR4: 00000000001726f0
Call Trace:
<TASK>
? __pfx_native_queued_spin_lock_slowpath+0x10/0x10
? __pfx__raw_spin_lock+0x10/0x10
_raw_spin_lock+0xca/0xe0
? __pfx__raw_spin_lock+0x10/0x10
? __pfx__raw_spin_lock+0x10/0x10
igrab+0x19/0x90
block_operations+0x4b5/0xdb0 [f2fs]
? __pfx_block_operations+0x10/0x10 [f2fs]
? update_curr+0x3fe/0x550
? down_write+0xc0/0x140
? __pfx_down_write+0x10/0x10
f2fs_write_checkpoint+0x1fe/0xf00 [f2fs]
? complete+0xb9/0x200
__checkpoint_and_complete_reqs+0xe1/0x310 [f2fs]
? __pfx__raw_spin_lock_irqsave+0x10/0x10
? __pfx___checkpoint_and_complete_reqs+0x10/0x10 [f2fs]
? prepare_to_wait_event+0x8e/0x720
issue_checkpoint_thread+0xc1/0x230 [f2fs]
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
? __pfx_autoremove_wake_function+0x10/0x10
? __kthread_parkme+0xb1/0x1f0
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
kthread+0x39b/0x750
? __pfx_kthread+0x10/0x10
? __pfx__raw_spin_lock_irq+0x10/0x10
? __pfx_kthread+0x10/0x10
? __pfx_kthread+0x10/0x10
ret_from_fork+0x24c/0x310
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>
Kernel panic - not syncing: softlockup: hung tasks
CPU: 0 UID: 0 PID: 5378 Comm: f2fs_ckpt-8:17 Tainted: G S           L      6.17.0-rc1-00015-gbc986b1d7564 #1 PREEMPT(voluntary) 
Tainted: [S]=CPU_OUT_OF_SPEC, [L]=SOFTLOCKUP
Hardware name: Dell Inc. OptiPlex 9020/0DNKMN, BIOS A05 12/05/2013
Call Trace:
<IRQ>
dump_stack_lvl+0x47/0x70
vpanic+0x1e4/0x480
? __pfx_vpanic+0x10/0x10
? show_trace_log_lvl+0x2a4/0x2e0
panic+0xbc/0xbc
? __pfx_panic+0x10/0x10
? ret_from_fork_asm+0x1a/0x30
? add_taint+0x26/0x70
watchdog_timer_fn.cold+0xd0/0xe4
? __pfx_watchdog_timer_fn+0x10/0x10
__hrtimer_run_queues+0x2c4/0x660
? sched_clock_cpu+0x68/0x520
? __pfx___hrtimer_run_queues+0x10/0x10
? ktime_get_update_offsets_now+0x82/0x320
? sched_clock+0xc/0x30
hrtimer_interrupt+0x2ce/0x7c0
__sysvec_apic_timer_interrupt+0x89/0x230
sysvec_apic_timer_interrupt+0x68/0x90
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20
RIP: 0010:native_queued_spin_lock_slowpath+0x704/0xad0
Code: 66 85 c0 74 39 48 b8 00 00 00 00 00 fc ff df 49 89 df 49 89 de 49 c1 ef 03 41 83 e6 07 49 01 c7 41 83 c6 03 f3 90 41 0f b6 07 <41> 38 c6 7c 08 84 c0 0f 85 5d 02 00 00 8b 03 66 85 c0 75 e6 89 44
RSP: 0018:ffffc90001a4f890 EFLAGS: 00000202
RAX: 0000000000000000 RBX: ffff88810d440080 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff88810d440082
RBP: ffff88836da42200 R08: 0000000000000001 R09: ffffed1021a88010
R10: ffff88810d440083 R11: 0000000000000000 R12: 1ffff92000349f14
R13: 0000000000040000 R14: 0000000000000003 R15: ffffed1021a88010
? __pfx_native_queued_spin_lock_slowpath+0x10/0x10
? __pfx__raw_spin_lock+0x10/0x10
_raw_spin_lock+0xca/0xe0
? __pfx__raw_spin_lock+0x10/0x10
? __pfx__raw_spin_lock+0x10/0x10
igrab+0x19/0x90
block_operations+0x4b5/0xdb0 [f2fs]
? __pfx_block_operations+0x10/0x10 [f2fs]
? update_curr+0x3fe/0x550
? down_write+0xc0/0x140
? __pfx_down_write+0x10/0x10
f2fs_write_checkpoint+0x1fe/0xf00 [f2fs]
? complete+0xb9/0x200
__checkpoint_and_complete_reqs+0xe1/0x310 [f2fs]
? __pfx__raw_spin_lock_irqsave+0x10/0x10
? __pfx___checkpoint_and_complete_reqs+0x10/0x10 [f2fs]
? prepare_to_wait_event+0x8e/0x720
issue_checkpoint_thread+0xc1/0x230 [f2fs]
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
? __pfx_autoremove_wake_function+0x10/0x10
? __kthread_parkme+0xb1/0x1f0
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
kthread+0x39b/0x750
? __pfx_kthread+0x10/0x10
? __pfx__raw_spin_lock_irq+0x10/0x10
? __pfx_kthread+0x10/0x10
? __pfx_kthread+0x10/0x10
ret_from_fork+0x24c/0x310
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250930/202509301450.138b448f-lkp@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] f2fs: don't call iput() from f2fs_drop_inode()
  2025-09-30  6:41 [linus:master] [fs] bc986b1d75: Kernel_panic-not_syncing:softlockup:hung_tasks kernel test robot
@ 2025-09-30 23:29 ` Mateusz Guzik
  2025-10-01 15:39   ` Jaegeuk Kim
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mateusz Guzik @ 2025-09-30 23:29 UTC (permalink / raw)
  To: brauner
  Cc: linux-kernel, linux-fsdevel, josef, oe-lkp, linux-f2fs-devel, ltp,
	oliver.sang, Mateusz Guzik

iput() calls the problematic routine, which does a ->i_count inc/dec
cycle. Undoing it with iput() recurses into the problem.

Note f2fs should not be playing games with the refcount to begin with,
but that will be handled later. Right now solve the immediate
regression.

Fixes: bc986b1d756482a ("fs: stop accessing ->i_count directly in f2fs and gfs2")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202509301450.138b448f-lkp@intel.com
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 2619cbbd7d2d..26ec31eb8c80 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1769,7 +1769,7 @@ static int f2fs_drop_inode(struct inode *inode)
 			sb_end_intwrite(inode->i_sb);
 
 			spin_lock(&inode->i_lock);
-			iput(inode);
+			atomic_dec(&inode->i_count);
 		}
 		trace_f2fs_drop_inode(inode, 0);
 		return 0;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] f2fs: don't call iput() from f2fs_drop_inode()
  2025-09-30 23:29 ` [PATCH] f2fs: don't call iput() from f2fs_drop_inode() Mateusz Guzik
@ 2025-10-01 15:39   ` Jaegeuk Kim
  2025-10-06 18:00   ` [f2fs-dev] " patchwork-bot+f2fs
  2025-10-09  3:34   ` Chao Yu
  2 siblings, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2025-10-01 15:39 UTC (permalink / raw)
  To: Mateusz Guzik
  Cc: brauner, linux-kernel, linux-fsdevel, josef, oe-lkp,
	linux-f2fs-devel, ltp, oliver.sang

On 10/01, Mateusz Guzik wrote:
> iput() calls the problematic routine, which does a ->i_count inc/dec
> cycle. Undoing it with iput() recurses into the problem.
> 
> Note f2fs should not be playing games with the refcount to begin with,
> but that will be handled later. Right now solve the immediate
> regression.
> 
> Fixes: bc986b1d756482a ("fs: stop accessing ->i_count directly in f2fs and gfs2")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202509301450.138b448f-lkp@intel.com
> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
> ---
>  fs/f2fs/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 2619cbbd7d2d..26ec31eb8c80 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1769,7 +1769,7 @@ static int f2fs_drop_inode(struct inode *inode)
>  			sb_end_intwrite(inode->i_sb);
>  
>  			spin_lock(&inode->i_lock);
> -			iput(inode);
> +			atomic_dec(&inode->i_count);

It seems this was applied by Josef [1], added in 6.18-rc1. Let me apply this fix
after my f2fs pull request, since I don't have this issue in my -next tree yet.

[1] https://lore.kernel.org/all/b8e6eb8a3e690ce082828d3580415bf70dfa93aa.1755806649.git.josef@toxicpanda.com/

>  		}
>  		trace_f2fs_drop_inode(inode, 0);
>  		return 0;
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: don't call iput() from f2fs_drop_inode()
  2025-09-30 23:29 ` [PATCH] f2fs: don't call iput() from f2fs_drop_inode() Mateusz Guzik
  2025-10-01 15:39   ` Jaegeuk Kim
@ 2025-10-06 18:00   ` patchwork-bot+f2fs
  2025-10-09  3:34   ` Chao Yu
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+f2fs @ 2025-10-06 18:00 UTC (permalink / raw)
  To: Mateusz Guzik
  Cc: brauner, linux-kernel, linux-f2fs-devel, oe-lkp, oliver.sang,
	linux-fsdevel, josef, ltp

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed,  1 Oct 2025 01:29:57 +0200 you wrote:
> iput() calls the problematic routine, which does a ->i_count inc/dec
> cycle. Undoing it with iput() recurses into the problem.
> 
> Note f2fs should not be playing games with the refcount to begin with,
> but that will be handled later. Right now solve the immediate
> regression.
> 
> [...]

Here is the summary with links:
  - [f2fs-dev] f2fs: don't call iput() from f2fs_drop_inode()
    https://git.kernel.org/jaegeuk/f2fs/c/8ec5fc1ff77e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: don't call iput() from f2fs_drop_inode()
  2025-09-30 23:29 ` [PATCH] f2fs: don't call iput() from f2fs_drop_inode() Mateusz Guzik
  2025-10-01 15:39   ` Jaegeuk Kim
  2025-10-06 18:00   ` [f2fs-dev] " patchwork-bot+f2fs
@ 2025-10-09  3:34   ` Chao Yu
  2 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2025-10-09  3:34 UTC (permalink / raw)
  To: Mateusz Guzik, brauner
  Cc: chao, linux-kernel, linux-f2fs-devel, oe-lkp, oliver.sang,
	linux-fsdevel, josef, ltp

On 10/1/2025 7:29 AM, Mateusz Guzik wrote:
> iput() calls the problematic routine, which does a ->i_count inc/dec
> cycle. Undoing it with iput() recurses into the problem.
> 
> Note f2fs should not be playing games with the refcount to begin with,
> but that will be handled later. Right now solve the immediate
> regression.
> 
> Fixes: bc986b1d756482a ("fs: stop accessing ->i_count directly in f2fs and gfs2")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202509301450.138b448f-lkp@intel.com
> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-09  3:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-30  6:41 [linus:master] [fs] bc986b1d75: Kernel_panic-not_syncing:softlockup:hung_tasks kernel test robot
2025-09-30 23:29 ` [PATCH] f2fs: don't call iput() from f2fs_drop_inode() Mateusz Guzik
2025-10-01 15:39   ` Jaegeuk Kim
2025-10-06 18:00   ` [f2fs-dev] " patchwork-bot+f2fs
2025-10-09  3:34   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox