Reiserfs development archive or lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+6450929faa7a97cd42d1@syzkaller.appspotmail.com
Cc: brauner@kernel.org, damien.lemoal@opensource.wdc.com,
	edward.shishkin@gmail.com, glider@google.com, jack@suse.cz,
	jlayton@kernel.org, linuszeng@tencent.com,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	reiserfs-devel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	willy@infradead.org
Subject: [PATCH] reiserfs: fix uninit-value in reiserfs_new_inode
Date: Sun, 31 Dec 2023 09:04:04 +0800	[thread overview]
Message-ID: <tencent_897491761D662E3D7336B297BA37064A7C09@qq.com> (raw)
In-Reply-To: <000000000000da757a060d58ebbe@google.com>

Before creating a new inode, it is necessary to initialize the "new packing
locality" tag of the dir.

Signed-off-by: Edward Adam Davis <eadavis@qq.com>
---
 fs/reiserfs/namei.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 994d6e6995ab..3a824fb170d5 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -638,6 +638,10 @@ static int reiserfs_create(struct mnt_idmap *idmap, struct inode *dir,
 	if (retval)
 		return retval;
 
+#ifdef DISPLACE_NEW_PACKING_LOCALITIES
+	REISERFS_I(dir)->new_packing_locality = 0;
+#endif
+
 	if (!(inode = new_inode(dir->i_sb))) {
 		return -ENOMEM;
 	}
-- 
2.43.0


      reply	other threads:[~2023-12-31  1:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  6:39 [syzbot] KMSAN: uninit-value in reiserfs_new_inode (2) syzbot
2023-12-25 17:30 ` [syzbot] [reiserfs?] " syzbot
2023-12-31  1:04   ` Edward Adam Davis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_897491761D662E3D7336B297BA37064A7C09@qq.com \
    --to=eadavis@qq.com \
    --cc=brauner@kernel.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=edward.shishkin@gmail.com \
    --cc=glider@google.com \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=linuszeng@tencent.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=syzbot+6450929faa7a97cd42d1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).