lkml.org 
[lkml]   [2016]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 23/28] Dont feed anything but regular iovecs to blk_rq_map_user_iov
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Linus Torvalds <torvalds@linux-foundation.org>

    commit a0ac402cfcdc904f9772e1762b3fda112dcc56a0 upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    block/blk-map.c | 3 +++
    1 file changed, 3 insertions(+)

    --- a/block/blk-map.c
    +++ b/block/blk-map.c
    @@ -90,6 +90,9 @@ int blk_rq_map_user_iov(struct request_q
    if (!iter || !iter->count)
    return -EINVAL;

    + if (!iter_is_iovec(iter))
    + return -EINVAL;
    +
    iov_for_each(iov, i, *iter) {
    unsigned long uaddr = (unsigned long) iov.iov_base;


    \
     
     \ /
      Last update: 2016-12-09 17:19    [W:3.391 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site