]> git.baikalelectronics.ru Git - 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)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 12 Jan 2018 20:23:36 +0000 (14:23 -0600)
commit38b6b8bcefb359cc5f6e965bfe5c8c2f10ac0f1d
tree2bb4ab3a88e8266cee7b4cda6512fa4cffb712fd
parent12f198a7bfc5131d7681967e100fc9870c1e3c05
mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy

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.

Cc: stable@vger.kernel.org
Fixes: 9efa7e5ba626 ("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>
arch/mn10300/mm/misalignment.c