Skip to content
Commit dec0370a authored by Jens Axboe's avatar Jens Axboe Committed by Adrian Bunk
Browse files

Fix missing ret assignment in __bio_map_user() error path



If get_user_pages() returns less pages than what we asked for, we
jump to out_unmap which will return ERR_PTR(ret). But ret can contain
a positive number just smaller than local_nr_pages, so be sure to set
it to -EFAULT always.

Problem found and diagnosed by Damien Le Moal <damien@sdl.hitachi.co.jp>

Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 296b3f9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment