Jérôme Glisse 13f5938d82 cifs: fix page reference leak with readv/writev
CIFS can leak pages reference gotten through GUP (get_user_pages*()
through iov_iter_get_pages()). This happen if cifs_send_async_read()
or cifs_write_from_iter() calls fail from within __cifs_readv() and
__cifs_writev() respectively. This patch move page unreference to
cifs_aio_ctx_release() which will happens on all code paths this is
all simpler to follow for correctness.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Steve French <sfrench@samba.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
2019-04-24 12:33:59 -05:00
..
2018-06-12 16:19:22 -07:00
2018-12-28 10:05:58 -06:00
2019-03-14 19:32:36 -05:00
2019-03-06 21:55:12 -06:00
2019-03-04 20:05:34 -06:00
2018-12-28 10:05:58 -06:00
2018-08-07 14:15:41 -05:00
2007-06-05 18:30:44 +00:00
2019-03-14 19:32:36 -05:00
2019-04-24 12:33:59 -05:00
2018-07-05 13:48:24 -05:00
2019-01-24 09:37:33 -06:00
2013-09-08 14:54:24 -05:00