FAILED: patch "[PATCH] xfs: fix a memory leak in xfs_buf_item_init()" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x fc40459de82543b565ebc839dca8f7987f16f62e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025122919-catty-unrated-e504@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From fc40459de82543b565ebc839dca8f7987f16f62e Mon Sep 17 00:00:00 2001
From: Haoxiang Li <[email protected]>
Date: Wed, 10 Dec 2025 17:06:01 +0800
Subject: [PATCH] xfs: fix a memory leak in xfs_buf_item_init()
xfs_buf_item_get_format() may allocate memory for bip->bli_formats, free the memory in the error path.
fs/xfs/xfs_buf_item.c +1 -0
@@ -896,6 +896,7 @@ xfs_buf_item_init( map_size =DIV_ROUND_UP (chunks,NBWORD );if (map_size >XFS_BLF_DATAMAP_SIZE ) { +xfs_buf_item_free_format (bip);kmem_cache_free (xfs_buf_item_cache, bip); xfs_err(mp, "buffer item dirty bitmap (%u uints) too small to reflect %u bytes!",
Sasha Levin
maintainerPATCH 1/1 xfs: fix a memory leak in xfs_buf_item_init()
From: Haoxiang Li <[email protected]>
[ Upstream commit fc40459de82543b565ebc839dca8f7987f16f62e ]
xfs_buf_item_get_format() may allocate memory for bip->bli_formats, free the memory in the error path.
--- fs/xfs/xfs_buf_item.c | 1 + 1 file changed, 1 insertion(+)
fs/xfs/xfs_buf_item.c +1 -0
@@ -744,6 +744,7 @@ xfs_buf_item_init( map_size =DIV_ROUND_UP (chunks,NBWORD );if (map_size >XFS_BLF_DATAMAP_SIZE ) { +xfs_buf_item_free_format (bip);kmem_cache_free (xfs_buf_item_zone, bip); xfs_err(mp, "buffer item dirty bitmap (%u uints) too small to reflect %u bytes!",
Signature · 1 line
2.51.0