mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+98547b0428b6a6a3467c@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [hfs?] memory leak in __hfs_bnode_create
Date: Fri, 17 Apr 2026 11:11:15 +0800	[thread overview]
Message-ID: <tencent_DAAEE40C8067D786E112D5065F89B62ED406@qq.com> (raw)
In-Reply-To: <69e1934c.a70a0220.7229.0011.GAE@google.com>

#syz test

diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index 394542a47e60..926e4b40a065 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -270,7 +270,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
 	struct hfs_btree *tree;
 	struct hfs_btree_header_rec *head;
 	struct address_space *mapping;
-	struct hfs_bnode *node;
+	struct hfs_bnode *node = NULL;
 	struct inode *inode;
 	struct page *page;
 	unsigned int size;
@@ -401,6 +401,8 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
 	put_page(page);
  free_inode:
 	tree->inode->i_mapping->a_ops = &hfsplus_aops;
+	if (!IS_ERR_OR_NULL(node))
+		hfs_bnode_put(node);
 	iput(tree->inode);
  free_tree:
 	kfree(tree);


  reply	other threads:[~2026-04-17  3:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17  1:56 syzbot
2026-04-17  3:11 ` Edward Adam Davis [this message]
2026-04-17  5:52   ` syzbot
2026-04-17  4:52 ` Edward Adam Davis
2026-04-17  6:12   ` syzbot
2026-04-17  5:04 ` Edward Adam Davis
2026-04-17  6:23   ` syzbot
2026-04-17  6:05 ` Edward Adam Davis
2026-04-17  6:47   ` syzbot
2026-04-17  6:22 ` Edward Adam Davis
2026-04-17  6:58   ` syzbot
2026-04-17  6:58 ` [PATCH] hfsplus: Supports freeing newly created tree head Edward Adam Davis
2026-04-17 22:03   ` Viacheslav Dubeyko
2026-04-18  9:37     ` Edward Adam Davis
2026-04-22 18:19       ` Viacheslav Dubeyko
2026-04-28  2:37         ` Edward Adam Davis

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_DAAEE40C8067D786E112D5065F89B62ED406@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+98547b0428b6a6a3467c@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®