projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b878ee
)
block/bio: Do not zero user pages
author
Keith Busch
<
[email protected]
>
Mon, 10 Dec 2018 15:44:42 +0000
(08:44 -0700)
committer
Jens Axboe
<
[email protected]
>
Mon, 10 Dec 2018 20:37:20 +0000
(13:37 -0700)
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:
[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]
>
block/bio.c
patch
|
blob
|
history
diff --git
a/block/bio.c
b/block/bio.c
index 4f4d9884443b63a8f002ddd754ea467f9a0e4c16..4d86e90654b20ff284df67ad594fd18013a14b60 100644
(file)
--- a/
block/bio.c
+++ b/
block/bio.c
@@
-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);
}