diff options
author | Thorsten Leemhuis <fedora@leemhuis.info> | 2016-12-09 16:33:59 +0100 |
---|---|---|
committer | Thorsten Leemhuis <fedora@leemhuis.info> | 2016-12-09 16:33:59 +0100 |
commit | 1c9ef035fc60893993f0a598522268bddd8e3c4b (patch) | |
tree | 0f8f66562b8ad258504f66808ac4626abc1f43ac /0001-Don-t-feed-anything-but-regular-iovec-s-to-blk_rq_ma.patch | |
parent | 0fed0da4377cb4bebac7885cbca5cfc082904396 (diff) | |
parent | 045c9968a718cd6d05136b0eaab1955e8b1ea18a (diff) | |
download | kernel-4.8.13-200.vanilla.knurd.1.fc24.tar.gz kernel-4.8.13-200.vanilla.knurd.1.fc24.tar.xz kernel-4.8.13-200.vanilla.knurd.1.fc24.zip |
Merge remote-tracking branch 'origin/f24' into f24-user-thl-vanilla-fedorakernel-4.8.13-200.vanilla.knurd.1.fc24
Diffstat (limited to '0001-Don-t-feed-anything-but-regular-iovec-s-to-blk_rq_ma.patch')
-rw-r--r-- | 0001-Don-t-feed-anything-but-regular-iovec-s-to-blk_rq_ma.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/0001-Don-t-feed-anything-but-regular-iovec-s-to-blk_rq_ma.patch b/0001-Don-t-feed-anything-but-regular-iovec-s-to-blk_rq_ma.patch new file mode 100644 index 000000000..8c3795439 --- /dev/null +++ b/0001-Don-t-feed-anything-but-regular-iovec-s-to-blk_rq_ma.patch @@ -0,0 +1,42 @@ +From a0ac402cfcdc904f9772e1762b3fda112dcc56a0 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds <torvalds@linux-foundation.org> +Date: Tue, 6 Dec 2016 16:18:14 -0800 +Subject: [PATCH] Don't feed anything but regular iovec's to + blk_rq_map_user_iov + +In theory we could map other things, but there's a reason that function +is called "user_iov". Using anything else (like splice can do) just +confuses it. + +Reported-and-tested-by: Johannes Thumshirn <jthumshirn@suse.de> +Cc: Al Viro <viro@ZenIV.linux.org.uk> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +--- + block/blk-map.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/block/blk-map.c b/block/blk-map.c +index b8657fa..27fd8d92 100644 +--- a/block/blk-map.c ++++ b/block/blk-map.c +@@ -118,6 +118,9 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, + struct iov_iter i; + int ret; + ++ if (!iter_is_iovec(iter)) ++ goto fail; ++ + if (map_data) + copy = true; + else if (iov_iter_alignment(iter) & align) +@@ -140,6 +143,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, + + unmap_rq: + __blk_rq_unmap_user(bio); ++fail: + rq->bio = NULL; + return -EINVAL; + } +-- +2.9.3 + |