mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Maiolino <cem@kernel.org>
To: Dawei Feng <dawei.feng@seu.edu.cn>
Cc: djwong@kernel.org, linux-xfs@vger.kernel.org,
	 linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	jianhao.xu@seu.edu.cn,  zilin@seu.edu.cn
Subject: Re: [PATCH] xfs: fix memory leak in xfs_dqinode_metadir_create()
Date: Wed, 01 Jul 2026 14:50:19 +0200	[thread overview]
Message-ID: <178291021990.353898.12065940355634080852.b4-ty@b4> (raw)
In-Reply-To: <20260627060402.2544349-1-dawei.feng@seu.edu.cn>

On Sat, 27 Jun 2026 14:04:02 +0800, Dawei Feng wrote:
> If xfs_metadir_create() fails in xfs_dqinode_metadir_create(), the current
> code returns directly, leaking the allocated update and transaction state.
> If the subsequent commit fails, the caller-owned inode reference is left
> behind.
> 
> Fix this memory leak by routing the create failure path through
> xfs_metadir_cancel().  For both create and commit failures, finish and
> release any inode returned to the caller, mirroring the unwind pattern in
> xfs_metadir_mkdir().
> 
> [...]

Applied to for-next, thanks!

[1/1] xfs: fix memory leak in xfs_dqinode_metadir_create()
      commit: 45de375b25060edf46e20abb36521ba530336ceb

Best regards,
-- 
Carlos Maiolino <cem@kernel.org>


      parent reply	other threads:[~2026-07-01 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27  6:04 Dawei Feng
2026-06-29 20:04 ` Darrick J. Wong
2026-07-01 12:50 ` Carlos Maiolino [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=178291021990.353898.12065940355634080852.b4-ty@b4 \
    --to=cem@kernel.org \
    --cc=dawei.feng@seu.edu.cn \
    --cc=djwong@kernel.org \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=zilin@seu.edu.cn \
    /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®