]> nv-tegra.nvidia Code Review - linux-2.6.git/commit - fs
[PATCH] Fix missing ret assignment in __bio_map_user() error path
authorJens Axboe <axboe@suse.de>
Fri, 16 Jun 2006 11:02:29 +0000 (13:02 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 17 Jun 2006 17:52:12 +0000 (10:52 -0700)
commit991721572ef2140c6411894aebefd3377e71a9e7
tree8264f83a60517616b860c0bce7d0e0413eb5c2cb
parent16070428d389ff47aa3476b0911179ad90c640a2
[PATCH] 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: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/bio.c