]> git.baikalelectronics.ru Git - kernel.git/commit
metag/usercopy: Add early abort to copy_to_user
authorJames Hogan <james.hogan@imgtec.com>
Fri, 31 Mar 2017 12:35:01 +0000 (13:35 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Wed, 5 Apr 2017 13:49:42 +0000 (14:49 +0100)
commit3eeabf1949fbe4f827154b83f46674bef2fd61b1
tree263488d227fe8bb0dea7749a07d45de104c62bd9
parent5acf4513f56f9f894c6b4c11a471d5e7521d7877
metag/usercopy: Add early abort to copy_to_user

When copying to userland on Meta, if any faults are encountered
immediately abort the copy instead of continuing on and repeatedly
faulting, and worse potentially copying further bytes successfully to
subsequent valid pages.

Fixes: 5ac8938ebf27 ("metag: Memory handling")
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
Cc: stable@vger.kernel.org
arch/metag/lib/usercopy.c