OSDN Git Service

more bio_map_user_iov() leak fixes
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 23 Sep 2017 19:51:23 +0000 (15:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Dec 2017 09:33:56 +0000 (10:33 +0100)
commit047a7bb12d63c41569ce9c9e88f5b231fd1f6cf5
tree10da6f392341790928fea027da0129c5f4cb180a
parent3a620404e24a8710a9e0f44b3c826536004c2d92
more bio_map_user_iov() leak fixes

commit 2b04e8f6bbb196cab4b232af0f8d48ff2c7a8058 upstream.

we need to take care of failure exit as well - pages already
in bio should be dropped by analogue of bio_unmap_pages(),
since their refcounts had been bumped only once per reference
in bio.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/bio.c