mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <slava@dubeyko.com>
To: Mahmut Emin Kurhan <guvenlik@noroxi.com>, linux-fsdevel@vger.kernel.org
Cc: glaubitz@physik.fu-berlin.de, frank.li@vivo.com,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] hfsplus, hfs: fix B-tree node leak on hfs_btree_open() error path
Date: Fri, 02 Oct 2026 11:18:43 -0700	[thread overview]
Message-ID: <e03cec7e17be27fde6b51957c61fb6958b9832ad.camel@dubeyko.com> (raw)
In-Reply-To: <20261001213807.1519745-1-guvenlik@noroxi.com>

On Thu, 2026-10-01 at 23:38 +0200, Mahmut Emin Kurhan wrote:
> This is v3 of the hfsplus/hfs B-tree node leak fix, rebased onto the
> for-next branch of the HFS/HFS+ tree as requested.
> 
> The leak is unchanged: hfs_btree_open() can fail after the head node
> has
> been inserted into tree->node_hash, and the error path does a bare
> kfree(tree) without freeing the hashed nodes. The fix factors the
> node-hash freeing out of hfs_btree_close() into hfs_bnode_hash_free()
> and
> calls it from both hfs_btree_close() and the hfs_btree_open() error
> path.
> 
> Changes since v2:
>  - rebased on for-next; the extracted helper now wraps the hash_lock
>    serialized close loop introduced by commit dce0e0248205
> ("hfs/hfsplus:
>    serialize B-tree close against folio release") (Slava Dubeyko)
>  - on the open error path the tree is not published yet, so the lock
> is
>    uncontended but kept for consistency
>  - no functional change to the leak fix itself
> 
> v2:
> https://lore.kernel.org/linux-fsdevel/20260930232312.1405042-1-guvenlik@noroxi.com
> 
> Mahmut Emin Kurhan (2):
>   hfsplus: free cached B-tree nodes on hfs_btree_open() error path
>   hfs: free cached B-tree nodes on hfs_btree_open() error path
> 
>  fs/hfs/btree.c     | 40 +++++++++++++++++++++++-----------------
>  fs/hfsplus/btree.c | 41 +++++++++++++++++++++++------------------
>  2 files changed, 46 insertions(+), 35 deletions(-)

The patchset looks reasonable to me. Let me run xfstests for the
patchset. I'll share the results ASAP.

Thanks,
Slava.

  parent reply	other threads:[~2026-10-02 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 18:50 [PATCH] hfsplus: free cached B-tree nodes " Mahmut Emin Kurhan
2026-09-30 23:04 ` Viacheslav Dubeyko
2026-09-30 23:23   ` [PATCH v2 0/2] hfsplus, hfs: fix B-tree node leak " Mahmut Emin Kurhan
2026-09-30 23:23     ` [PATCH v2 1/2] hfsplus: free cached B-tree nodes " Mahmut Emin Kurhan
2026-10-01 20:03       ` Viacheslav Dubeyko
2026-10-01 21:38         ` [PATCH v3 0/2] hfsplus, hfs: fix B-tree node leak " Mahmut Emin Kurhan
2026-10-01 21:38           ` [PATCH v3 1/2] hfsplus: free cached B-tree nodes " Mahmut Emin Kurhan
2026-10-05 19:16             ` Viacheslav Dubeyko
2026-10-01 21:38           ` [PATCH v3 2/2] hfs: " Mahmut Emin Kurhan
2026-10-05 19:20             ` Viacheslav Dubeyko
2026-10-02 18:18           ` Viacheslav Dubeyko [this message]
2026-10-05 18:51             ` [PATCH v3 0/2] hfsplus, hfs: fix B-tree node leak " Viacheslav Dubeyko
2026-09-30 23:23     ` [PATCH v2 2/2] hfs: free cached B-tree nodes " Mahmut Emin Kurhan
2026-10-01 20:03       ` Viacheslav Dubeyko

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=e03cec7e17be27fde6b51957c61fb6958b9832ad.camel@dubeyko.com \
    --to=slava@dubeyko.com \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=guvenlik@noroxi.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®