mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
block/bio: Do not zero user pages
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 <[email protected]>
Cc: Laurence Oberman <[email protected]>
Cc: [email protected]
Cc: Bart Van Assche <[email protected]>
Tested-by: Laurence Oberman <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
8b878ee247
commit
f55adad601
1 changed files with 2 additions and 1 deletions
|
|
@ -1261,7 +1261,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 a new issue