From: Siddharth Menon <simeddon@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
syzbot+fdedff847a0e5e84c39f@syzkaller.appspotmail.com,
Siddharth Menon <simeddon@gmail.com>
Subject: [PATCH v2] hfsplus: Initialize directory subfolders in hfsplus_mknod
Date: Sat, 27 Jul 2024 11:43:04 +0530 [thread overview]
Message-ID: <20240727061303.115044-1-simeddon@gmail.com> (raw)
Addresses uninitialized subfolders attribute being used in
`hfsplus_subfolders_inc` and `hfsplus_subfolders_dec`.
Fixes: https://syzkaller.appspot.com/bug?extid=fdedff847a0e5e84c39f
Reported-by: syzbot+fdedff847a0e5e84c39f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/x/report.txt?x=16efda06680000
Signed-off-by: Siddharth Menon <simeddon@gmail.com>
---
Removed changes that was accidentally added while debugging
and reformatted the message.
fs/hfsplus/dir.c | 3 +++
1 file changed, 3 insertions(+)
644
--- a/fs/hfsplus/dir.c
+++ b/fs/hfsplus/dir.c
@@ -485,6 +485,9 @@ static int hfsplus_mknod(struct mnt_idmap *idmap, struct inode *dir,
mutex_lock(&sbi->vh_mutex);
inode = hfsplus_new_inode(dir->i_sb, dir, mode);
+ if (test_bit(HFSPLUS_SB_HFSX, &sbi->flags))
+ HFSPLUS_I(dir)->subfolders = 0;
+
if (!inode)
goto out;
--
2.39.2
next reply other threads:[~2024-07-27 6:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-27 6:13 Siddharth Menon [this message]
2024-07-27 14:52 ` [PATCH v2] hfsplus: Initialize directory subfolders in hfsplus_mknod Matthew Wilcox
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=20240727061303.115044-1-simeddon@gmail.com \
--to=simeddon@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=syzbot+fdedff847a0e5e84c39f@syzkaller.appspotmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.