From: Mikulas Patocka <mpatocka@redhat.com>
To: Mike Snitzer <msnitzer@redhat.com>
Cc: dm-devel@redhat.com
Subject: [dm-devel] [PATCH 2/3] dm-flakey: fix a bug with 32-bit highmem systems
Date: Sun, 22 Jan 2023 14:03:31 -0500 (EST) [thread overview]
Message-ID: <alpine.LRH.2.21.2301221402580.15312@file01.intranet.prod.int.rdu2.redhat.com> (raw)
The function page_address does not work with 32-bit systems with high
memory. Use bvec_kmap_local/kunmap_local instead.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
---
drivers/md/dm-flakey.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: bcachefs/drivers/md/dm-flakey.c
===================================================================
--- bcachefs.orig/drivers/md/dm-flakey.c 2023-01-22 16:58:40.000000000 +0100
+++ bcachefs/drivers/md/dm-flakey.c 2023-01-22 17:13:53.000000000 +0100
@@ -307,8 +307,9 @@ static void corrupt_bio_data(struct bio
struct page *page = bio_iter_page(bio, iter);
if (unlikely(page == ZERO_PAGE(0)))
break;
- segment = (page_address(page) + bio_iter_offset(bio, iter));
+ segment = bvec_kmap_local(&bvec);
segment[corrupt_bio_byte] = fc->corrupt_bio_value;
+ kunmap_local(segment);
DMDEBUG("Corrupting data bio=%p by writing %u to byte %u "
"(rw=%c bi_opf=%u bi_sector=%llu size=%u)\n",
bio, fc->corrupt_bio_value, fc->corrupt_bio_byte,
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next reply other threads:[~2023-01-22 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-22 19:03 Mikulas Patocka [this message]
2023-01-23 5:00 ` [dm-devel] [PATCH 2/3] dm-flakey: fix a bug with 32-bit highmem systems Sweet Tea Dorminy
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=alpine.LRH.2.21.2301221402580.15312@file01.intranet.prod.int.rdu2.redhat.com \
--to=mpatocka@redhat.com \
--cc=dm-devel@redhat.com \
--cc=msnitzer@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.