mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
block/bio: Do not zero user pages
commitf55adad601upstream. We don't need to zero fill the bio if not using kernel allocated pages. Fixes:f3587d76da("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> Tested-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
beb98fda18
commit
7290c71ded
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user