Commit a713ff5b authored by Keith Busch's avatar Keith Busch Committed by Kleber Sacilotto de Souza

block/bio: Do not zero user pages

BugLink: http://bugs.launchpad.net/bugs/1834499

We don't need to zero fill the bio if not using kernel allocated pages.

Fixes: f3587d76 ("block: Clear kernel memory before copying to user") # v4.20-rc2
Reported-by: default avatarTodd Aiken <taiken@mvtech.ca>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: stable@vger.kernel.org
Cc: Bart Van Assche <bvanassche@acm.org>
Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
(cherry picked from commit f55adad6)
Signed-off-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent aceb27a7
......@@ -1238,6 +1238,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
} else {
if (bmd->is_our_pages)
zero_fill_bio(bio);
iov_iter_advance(iter, bio->bi_iter.bi_size);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment