linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block
@ 2023-04-03 16:50 Jaegeuk Kim
  2023-04-03 16:54 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
  2023-04-04  1:54 ` [f2fs-dev] [PATCH] " patchwork-bot+f2fs
  0 siblings, 2 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2023-04-03 16:50 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

We got a kernel panic if old_addr is NULL.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 72bce3808394..2439d7029e64 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -257,7 +257,7 @@ static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,
 	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;
 }
 
-- 
2.40.0.348.gf938b09366-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, other threads:[~2023-04-04  1:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 16:50 [f2fs-dev] [PATCH] f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block Jaegeuk Kim
2023-04-03 16:54 ` [f2fs-dev] [PATCH v2] " Jaegeuk Kim
2023-04-04  1:18   ` Chao Yu
2023-04-04  1:54 ` [f2fs-dev] [PATCH] " patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).