signal/x86: Call force_sig_pkuerr from __bad_area_nosemaphore
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 17 Sep 2018 23:23:35 +0000 (01:23 +0200)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 21 Sep 2018 13:03:05 +0000 (15:03 +0200)
commit9db812dbb29d6244a9192e220deebdbc0080b38c
treebd1738dc99c140cfa955bef253d2fd135fcd8430
parentaba1ecd32c756e5d3c220aae9928d18c43d78cd0
signal/x86: Call force_sig_pkuerr from __bad_area_nosemaphore

There is only one code path that can generate a pkuerr signal.  That
code path calls __bad_area_nosemaphore and can be dectected by testing
if si_code == SEGV_PKUERR.  It can be seen from inspection that all of
the other tests in fill_sig_info_pkey are unnecessary.

Therefore call force_sig_pkuerr directly from __bad_area_semaphore and
remove fill_sig_info_pkey.

At the same time move the comment above force_sig_info_pkey into
bad_area_access_error, so that the documentation about pkey generation
races is not lost.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/x86/mm/fault.c