Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1738230
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov |
| Date | 2017-09-24 19:20 +0200 |
| Message-ID | <utiJr-32Y-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <usVDb-5pJ-23@gated-at.bofh.it> <usVWy-5ym-7@gated-at.bofh.it> <usWfU-5U4-11@gated-at.bofh.it> <usZns-7Qw-5@gated-at.bofh.it> <utg4W-1lc-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Sep 24, 2017 at 03:27:39PM +0100, Al Viro wrote: > At the very least, we need bmd->iter = *iter; bmd->iter.iov = bmd->iov; > instead of that iov_iter_init() in there. I'm not sure how far back does > it go; looks like "block: support large requests in blk_rq_map_user_iov" > is the earliest possible point, but it might need more digging to make > sure. v4.5+, if that's when the problems began... > > Anyway, I'd added the obvious fix to #work.iov_iter, reordered it and > force-pushed the result. While we are at it, calculation of nr_pages in bio_copy_user_iov() is bloody odd - why, in the name of everything unholy, does it care about the iovec boundaries in there? We are copying data anyway; why does allocation of bio care about the fragmentation of the other end of copying? Shouldn't it be simply max(DIV_ROUND_UP(offset + len, PAGE_SIZE), BIO_MAX_PAGES)?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] fix unbalanced page refcounting in bio_map_user_iov Vitaly Mayatskikh <v.mayatskih@gmail.com> - 2017-09-22 07:20 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Vitaly Mayatskikh <v.mayatskih@gmail.com> - 2017-09-22 07:30 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-23 18:40 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-23 19:00 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-23 19:20 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-23 22:40 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-24 16:30 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-24 19:20 +0200
Re: [PATCH] fix unbalanced page refcounting in bio_map_user_iov Vitaly Mayatskikh <v.mayatskih@gmail.com> - 2017-09-25 03:50 +0200
csiph-web