]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 1 Aug 2017 10:02:38 +0000 (05:02 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 3 Apr 2018 12:59:09 +0000 (14:59 +0200)
commitbc24964452116d9e169b37918959993b5b22c4fb
tree24e973ba14cbd5d17f98b40aa5ecfe9b74a91821
parentc2343d4c2448bf70160380556287660922e79744
mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy

BugLink: http://bugs.launchpad.net/bugs/1756121
commit 6ac1dc736b323011a55ecd1fc5897c24c4f77cbd upstream.

Setting si_code to 0 is the same a setting si_code to SI_USER which is definitely
not correct.  With si_code set to SI_USER si_pid and si_uid will be copied to
userspace instead of si_addr.  Which is very wrong.

So fix this by using a sensible si_code (SEGV_MAPERR) for this failure.

Fixes: b920de1b77b7 ("mn10300: add the MN10300/AM33 architecture to the kernel")
Cc: David Howells <dhowells@redhat.com>
Cc: Masakazu Urade <urade.masakazu@jp.panasonic.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/mn10300/mm/misalignment.c