提交 53cc0b29 编写于 作者: P Petr Vandrovec 提交者: Jens Axboe

When block layer fails to map iov, it calls bio_unmap_user to undo

mapping.  Which is good if pages were mapped - but if they were provided
by someone else and just copied then bad things happen - pages are
released once here, and once by caller, leading to user triggerable BUG
at include/linux/mm.h:246.
Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 f6f7b52e
......@@ -224,7 +224,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
*/
bio_get(bio);
bio_endio(bio, 0);
bio_unmap_user(bio);
__blk_rq_unmap_user(bio);
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册