From: Hardeep Sharma <quic_hardshar@quicinc.com>
To: Jens Axboe <axboe@kernel.dk>, Hannes Reinecke <hare@suse.de>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Hardeep Sharma <quic_hardshar@quicinc.com>
Subject: [PATCH 6.6.y v2 1/1] block: Fix bounce check logic in blk_queue_may_bounce()
Date: Fri, 25 Jul 2025 16:57:10 +0530 [thread overview]
Message-ID: <20250725112710.219313-1-quic_hardshar@quicinc.com> (raw)
Buffer bouncing is needed only when memory exists above the lowmem region,
i.e., when max_low_pfn < max_pfn. The previous check (max_low_pfn >=
max_pfn) was inverted and prevented bouncing when it could actually be
required.
Note that bouncing depends on CONFIG_HIGHMEM, which is typically enabled
on 32-bit ARM where not all memory is permanently mapped into the kernel’s
lowmem region.
Fixes: 9bb33f24abbd0 ("block: refactor the bounce buffering code")
Cc: stable@vger.kernel.org
Signed-off-by: Hardeep Sharma <quic_hardshar@quicinc.com>
---
Changelog v1..v2:
* Updated subject line
block/blk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk.h b/block/blk.h
index 67915b04b3c1..f8a1d64be5a2 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -383,7 +383,7 @@ static inline bool blk_queue_may_bounce(struct request_queue *q)
{
return IS_ENABLED(CONFIG_BOUNCE) &&
q->limits.bounce == BLK_BOUNCE_HIGH &&
- max_low_pfn >= max_pfn;
+ max_low_pfn < max_pfn;
}
static inline struct bio *blk_queue_bounce(struct bio *bio,
--
2.25.1
next reply other threads:[~2025-07-25 11:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 11:27 Hardeep Sharma [this message]
2025-07-25 12:04 ` [PATCH 6.6.y v2 1/1] block: Fix bounce check logic in blk_queue_may_bounce() Greg KH
-- strict thread matches above, loose matches on Subject: below --
2025-08-14 6:36 Hardeep Sharma
2025-08-14 9:03 ` Greg KH
2025-08-14 10:54 ` Hardeep Sharma
2025-08-14 11:36 ` Greg KH
2025-08-14 13:06 ` Hardeep Sharma
2025-08-14 13:54 ` Greg KH
2025-08-14 13:11 ` Hardeep Sharma
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=20250725112710.219313-1-quic_hardshar@quicinc.com \
--to=quic_hardshar@quicinc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.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