block/bio: Do not zero user pages
Subsystems (2)
PATCH 1/1 block/bio: Do not zero user pages
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 <[email protected]>
Cc Laurence Oberman <[email protected]>
Cc Bart Van Assche <[email protected]>
Signed-off-by Keith Busch <[email protected]>
--- block/bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/bio.c +2 -1
@@ -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); }
Signature · 1 line
2.13.6
Jens Axboe
maintainerQuoted 1 line · Keith Busch
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.
Signature · 1 line
Jens Axboe