* Patch "bio_copy_user_iov(): don't ignore ->iov_offset" has been added to the 4.9-stable tree
@ 2017-10-15 14:29 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-15 14:29 UTC (permalink / raw)
To: viro, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
bio_copy_user_iov(): don't ignore ->iov_offset
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
bio_copy_user_iov-don-t-ignore-iov_offset.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 1cfd0ddd82232804e03f3023f6a58b50dfef0574 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Sun, 24 Sep 2017 10:21:15 -0400
Subject: bio_copy_user_iov(): don't ignore ->iov_offset
From: Al Viro <viro@zeniv.linux.org.uk>
commit 1cfd0ddd82232804e03f3023f6a58b50dfef0574 upstream.
Since "block: support large requests in blk_rq_map_user_iov" we
started to call it with partially drained iter; that works fine
on the write side, but reads create a copy of iter for completion
time. And that needs to take the possibility of ->iov_iter != 0
into account...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
block/bio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/block/bio.c
+++ b/block/bio.c
@@ -1171,8 +1171,8 @@ struct bio *bio_copy_user_iov(struct req
*/
bmd->is_our_pages = map_data ? 0 : 1;
memcpy(bmd->iov, iter->iov, sizeof(struct iovec) * iter->nr_segs);
- iov_iter_init(&bmd->iter, iter->type, bmd->iov,
- iter->nr_segs, iter->count);
+ bmd->iter = *iter;
+ bmd->iter.iov = bmd->iov;
ret = -ENOMEM;
bio = bio_kmalloc(gfp_mask, nr_pages);
Patches currently in stable-queue which might be from viro@zeniv.linux.org.uk are
queue-4.9/more-bio_map_user_iov-leak-fixes.patch
queue-4.9/direct-io-prevent-null-pointer-access-in-submit_page_section.patch
queue-4.9/bio_copy_user_iov-don-t-ignore-iov_offset.patch
queue-4.9/fix-unbalanced-page-refcounting-in-bio_map_user_iov.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-15 14:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-15 14:29 Patch "bio_copy_user_iov(): don't ignore ->iov_offset" has been added to the 4.9-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.