Re: [syzbot] Re: KMSAN: uninit-value in f2fs_new_node_page()
From: syzbot
Date: Tue Dec 03 2024 - 11:28:58 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: Re: KMSAN: uninit-value in f2fs_new_node_page()
Author: dmantipov@xxxxxxxxx
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cdd30ebb1b9f36159d66f088b61aee264e649d7a
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 6aea13024ac1..7371c09174cb 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -105,6 +105,7 @@ static inline bool get_nat_flag(struct nat_entry *ne, unsigned int type)
static inline void nat_reset_flag(struct nat_entry *ne)
{
+ ne->ni.flag = 0;
/* these states can be set only after checkpoint was done */
set_nat_flag(ne, IS_CHECKPOINTED, true);
set_nat_flag(ne, HAS_FSYNCED_INODE, false);
@@ -117,6 +118,7 @@ static inline void node_info_from_raw_nat(struct node_info *ni,
ni->ino = le32_to_cpu(raw_ne->ino);
ni->blk_addr = le32_to_cpu(raw_ne->block_addr);
ni->version = raw_ne->version;
+ ni->flag = 0;
}
static inline void raw_nat_from_node_info(struct f2fs_nat_entry *raw_ne,