* [PATCH next] xfs: fix memory leak in xfs_growfs_check_rtgeom()
@ 2025-12-19 10:33 Dan Carpenter
2025-12-19 11:14 ` Christoph Hellwig
2026-01-09 15:03 ` Carlos Maiolino
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-12-19 10:33 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Carlos Maiolino, Darrick J. Wong, linux-xfs, linux-kernel,
kernel-janitors
Free the "nmp" allocation before returning -EINVAL.
Fixes: dc68c0f60169 ("xfs: fix the zoned RT growfs check for zone alignment")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
fs/xfs/xfs_rtalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index e063f4f2f2e6..167298ad88dd 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1265,7 +1265,7 @@ xfs_growfs_check_rtgeom(
uint32_t rem;
if (rextsize != 1)
- return -EINVAL;
+ goto out_inval;
div_u64_rem(nmp->m_sb.sb_rblocks, gblocks, &rem);
if (rem) {
xfs_warn(mp,
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] xfs: fix memory leak in xfs_growfs_check_rtgeom()
2025-12-19 10:33 [PATCH next] xfs: fix memory leak in xfs_growfs_check_rtgeom() Dan Carpenter
@ 2025-12-19 11:14 ` Christoph Hellwig
2026-01-09 15:03 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-12-19 11:14 UTC (permalink / raw)
To: Dan Carpenter
Cc: Christoph Hellwig, Carlos Maiolino, Darrick J. Wong, linux-xfs,
linux-kernel, kernel-janitors
On Fri, Dec 19, 2025 at 01:33:50PM +0300, Dan Carpenter wrote:
> Free the "nmp" allocation before returning -EINVAL.
>
> Fixes: dc68c0f60169 ("xfs: fix the zoned RT growfs check for zone alignment")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] xfs: fix memory leak in xfs_growfs_check_rtgeom()
2025-12-19 10:33 [PATCH next] xfs: fix memory leak in xfs_growfs_check_rtgeom() Dan Carpenter
2025-12-19 11:14 ` Christoph Hellwig
@ 2026-01-09 15:03 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2026-01-09 15:03 UTC (permalink / raw)
To: Christoph Hellwig, Dan Carpenter
Cc: Darrick J. Wong, linux-xfs, linux-kernel, kernel-janitors
On Fri, 19 Dec 2025 13:33:50 +0300, Dan Carpenter wrote:
> Free the "nmp" allocation before returning -EINVAL.
>
>
Applied to for-next, thanks!
[1/1] xfs: fix memory leak in xfs_growfs_check_rtgeom()
commit: 8dad31f85c7b91fd8bdbc6d0f27abc53bd8b1ffe
Best regards,
--
Carlos Maiolino <cem@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-09 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-19 10:33 [PATCH next] xfs: fix memory leak in xfs_growfs_check_rtgeom() Dan Carpenter
2025-12-19 11:14 ` Christoph Hellwig
2026-01-09 15:03 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox