Message ID | 20190415183727.982514505@linuxfoundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
--- a/block/bio.c +++ b/block/bio.c @@ -1214,8 +1214,11 @@ struct bio *bio_copy_user_iov(struct req } } - if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes) + if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes) { + if (!map_data) + __free_page(page); break; + } len -= bytes; offset = 0;