[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181218163929.193192006@linuxfoundation.org>
Date: Tue, 18 Dec 2018 17:39:26 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Todd Aiken <taiken@...ech.ca>,
Laurence Oberman <loberman@...hat.com>,
Bart Van Assche <bvanassche@....org>,
Keith Busch <keith.busch@...el.com>,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 4.19 14/44] block/bio: Do not zero user pages
4.19-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <keith.busch@...el.com>
commit f55adad601c6a97c8c9628195453e0fb23b4a0ae upstream.
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@...ech.ca>
Cc: Laurence Oberman <loberman@...hat.com>
Cc: stable@...r.kernel.org
Cc: Bart Van Assche <bvanassche@....org>
Tested-by: Laurence Oberman <loberman@...hat.com>
Signed-off-by: Keith Busch <keith.busch@...el.com>
Signed-off-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
block/bio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/block/bio.c
+++ b/block/bio.c
@@ -1262,7 +1262,8 @@ struct bio *bio_copy_user_iov(struct req
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);
}
Powered by blists - more mailing lists