fix a page leak in vhost_scsi_iov_to_sgl() error recovery
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 24 Sep 2017 22:36:44 +0000 (18:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:49 +0000 (08:40 +0000)
commit357621bca2cb346513d7f4d8f57edb53bd7bbe44
treedd1a1e7a9478fc9333a9b921d2ee7d46f44dfa6f
parent04dd27af8ea24db24d0777a9ef3259621f32d6f5
fix a page leak in vhost_scsi_iov_to_sgl() error recovery

commit 11d49e9d089ccec81be87c2386dfdd010d7f7f6e upstream.

we are advancing sg as we go, so the pages we need to drop in
case of error are *before* the current sg.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vhost/scsi.c