Skip to content
Commit c26156b2 authored by Jens Axboe's avatar Jens Axboe
Browse files

block: hold extra reference to bio in blk_rq_map_user_iov()



If the size passed in is OK but we end up mapping too many segments,
we call the unmap path directly like from IO completion. But from IO
completion we have an extra reference to the bio, so this error case
goes OOPS when it attempts to free and already free bio.

Fix it by getting an extra reference to the bio before calling the
unmap failure case.

Reported-by: default avatarPetr Vandrovec <vandrove@vc.cvut.cz>

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 98ba4031
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment