Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>,
	Chunhui He <hchunhui@mail.ustc.edu.cn>,
	Robin Murphy <roin.murphy@arm.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 1/3] dma-pool: remove a __maybe_unused label in atomic_pool_expand
Date: Thu,  3 Dec 2026 14:44:43 -0500	[thread overview]
Message-ID: <20261203194433.674726-1-sashal@kernel.org> (raw)
In-Reply-To: <2026120206-preacher-willow-783b@gregkh>

From: Christoph Hellwig <hch@lst.de>

[ Upstream commit 765aa6b3a462ed69ddcb1c41a6f7f93b8abb7d43 ]

Move the #endif a line so that free_page label is only seen by the
compile pass when actually used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chunhui He <hchunhui@mail.ustc.edu.cn>
Reviewed-by: Robin Murphy <roin.murphy@arm.com>
Stable-dep-of: ca010d38da7b ("dma-pool: release CMA pages on atomic_pool_expand() error path")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 kernel/dma/pool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
index 8fc6e3b8f8372..3037a260ad36d 100644
--- a/kernel/dma/pool.c
+++ b/kernel/dma/pool.c
@@ -135,9 +135,9 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size,
 remove_mapping:
 #ifdef CONFIG_DMA_DIRECT_REMAP
 	dma_common_free_remap(addr, pool_size);
-#endif
-free_page: __maybe_unused
+free_page:
 	__free_pages(page, order);
+#endif
 out:
 	return ret;
 }
-- 
2.53.0


  reply	other threads:[~2026-12-03 19:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 13:00 FAILED: patch "[PATCH] dma-pool: release CMA pages on atomic_pool_expand() error" failed to apply to 6.1-stable tree gregkh
2026-12-03 19:44 ` Sasha Levin [this message]
2026-12-03 19:44   ` [PATCH 6.1.y 2/3] dma-pool: fix page leak in atomic_pool_expand() cleanup Sasha Levin
2026-12-03 19:44   ` [PATCH 6.1.y 3/3] dma-pool: release CMA pages on atomic_pool_expand() error path Sasha Levin

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=20261203194433.674726-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hch@lst.de \
    --cc=hchunhui@mail.ustc.edu.cn \
    --cc=roin.murphy@arm.com \
    --cc=stable@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