* [PATCH] block/bio: Do not zero user pages
@ 2018-12-10 15:44 Keith Busch
2018-12-10 20:37 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2018-12-10 15:44 UTC (permalink / raw)
To: Jens Axboe, linux-block
Cc: Christoph Hellwig, Keith Busch, Laurence Oberman, stable,
Bart Van Assche
We don't need to zero fill the bio if not using kernel allocated pages.
Fixes: f3587d76da05 ("block: Clear kernel memory before copying to user") # v4.20-rc2
Reported-by: Todd Aiken <taiken@mvtech.ca>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: stable@vger.kernel.org
Cc: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
block/bio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/bio.c b/block/bio.c
index c4ef8aa46452..55a5386fd431 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1262,7 +1262,8 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
} else {
- zero_fill_bio(bio);
+ if (bmd->is_our_pages)
+ zero_fill_bio(bio);
iov_iter_advance(iter, bio->bi_iter.bi_size);
}
--
2.13.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block/bio: Do not zero user pages
2018-12-10 15:44 [PATCH] block/bio: Do not zero user pages Keith Busch
@ 2018-12-10 20:37 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-12-10 20:37 UTC (permalink / raw)
To: Keith Busch, linux-block
Cc: Christoph Hellwig, Laurence Oberman, stable, Bart Van Assche
On 12/10/18 8:44 AM, Keith Busch wrote:
> We don't need to zero fill the bio if not using kernel allocated pages.
Applied, thanks Keith. I added Laurence's Tested-by to the commit.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-10 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 15:44 [PATCH] block/bio: Do not zero user pages Keith Busch
2018-12-10 20:37 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).