[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TNxAApRrZdXR4QxAVnv4G3kjNaa0xFOi94VAboFOlyOtiAY8oIR8evv4ZHrrl2lPngndHbqKBWTpS_N8HlaFq0YfE-amWQBOPks6cXz3B-I=@proton.me>
Date: Sun, 17 Nov 2024 23:51:39 +0000
From: Piotr Zalewski <pZ010001011111@...ton.me>
To: syzbot <syzbot+62f5ae3a10a9e97accd4@...kaller.appspotmail.com>
Cc: kent.overstreet@...ux.dev, linux-bcachefs@...r.kernel.org, linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bcachefs?] KMSAN: uninit-value in bch2_btree_node_iter_init (2)
Hi, all
This seems to be the proper way to fix this?:
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c
index 89a42ee81e5c..f92a3fb946de 100644
--- a/fs/bcachefs/btree_io.c
+++ b/fs/bcachefs/btree_io.c
@@ -324,6 +324,7 @@ static void btree_node_sort(struct bch_fs *c, struct btree *b,
start_time = local_clock();
u64s = bch2_sort_keys(out->keys.start, &sort_iter.iter);
+ memset((out->keys.start + u64s), 0, bytes - sizeof(struct btree_node) - u64s * sizeof(u64));
out->keys.u64s = cpu_to_le16(u64s);
Powered by blists - more mailing lists