This is a note to let you know that I've just added the patch titled f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block to the 6.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: f2fs-fix-null-pointer-panic-in-tracepoint-in-__replace_atomic_write_block.patch and it can be found in the queue-6.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From da6ea0b050fa720302b56fbb59307e7c7531a342 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Date: Mon, 3 Apr 2023 09:37:24 -0700 Subject: f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> commit da6ea0b050fa720302b56fbb59307e7c7531a342 upstream. We got a kernel panic if old_addr is NULL. https://bugzilla.kernel.org/show_bug.cgi?id=217266 BUG: kernel NULL pointer dereference, address: 0000000000000000 Call Trace: <TASK> f2fs_commit_atomic_write+0x619/0x990 [f2fs a1b985b80f5babd6f3ea778384908880812bfa43] __f2fs_ioctl+0xd8e/0x4080 [f2fs a1b985b80f5babd6f3ea778384908880812bfa43] ? vfs_write+0x2ae/0x3f0 ? vfs_write+0x2ae/0x3f0 __x64_sys_ioctl+0x91/0xd0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f69095fe53f Fixes: 2f3a9ae990a7 ("f2fs: introduce trace_f2fs_replace_atomic_write_block") Cc: <stable@xxxxxxxxxxxxxxx> Reviewed-by: Chao Yu <chao@xxxxxxxxxx> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -263,7 +263,7 @@ retry: f2fs_put_dnode(&dn); trace_f2fs_replace_atomic_write_block(inode, F2FS_I(inode)->cow_inode, - index, *old_addr, new_addr, recover); + index, old_addr ? *old_addr : 0, new_addr, recover); return 0; } Patches currently in stable-queue which might be from jaegeuk@xxxxxxxxxx are queue-6.3/f2fs-factor-out-discard_cmd-usage-from-general-rb_tree-use.patch queue-6.3/f2fs-factor-out-victim_entry-usage-from-general-rb_tree-use.patch queue-6.3/f2fs-fix-potential-corruption-when-moving-a-directory.patch queue-6.3/f2fs-remove-entire-rb_entry-sharing.patch queue-6.3/f2fs-fix-null-pointer-panic-in-tracepoint-in-__replace_atomic_write_block.patch