[PATCH] splice: fix possible memory leak in vmsplice_to_user().

2014-04-30 Thread Leon Yu
Since commit 6130f5315 ("switch vmsplice_to_user() to copy_page_to_iter()"), rw_copy_check_uvector is used for sanity check, however, iov can be leaked if that check failed. So, fix it by handling this error path properly. Signed-off-by: Leon Yu --- fs/splice.c | 3 ++- 1 file changed, 2

[PATCH] splice: fix possible memory leak in vmsplice_to_user().

2014-04-30 Thread Leon Yu
Since commit 6130f5315 (switch vmsplice_to_user() to copy_page_to_iter()), rw_copy_check_uvector is used for sanity check, however, iov can be leaked if that check failed. So, fix it by handling this error path properly. Signed-off-by: Leon Yu chianglun...@gmail.com --- fs/splice.c | 3 ++- 1