]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: mm: fix alignment handler faults under memory pressure
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 31 Aug 2019 16:01:58 +0000 (17:01 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Wed, 9 Oct 2019 22:29:40 +0000 (23:29 +0100)
commitf147e285f211b3de3a138a18814d194869a3037e
treeb2d3a83245585d019b2200580c1a75a4cedfab92
parentc43e7830cb96a1272544b1f399271ba986393b03
ARM: mm: fix alignment handler faults under memory pressure

When the system has high memory pressure, the page containing the
instruction may be paged out.  Using probe_kernel_address() means that
if the page is swapped out, the resulting page fault will not be
handled because page faults are disabled by this function.

Use get_user() to read the instruction instead.

Reported-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Fixes: 86abe688e3e6 ("ARM: fix scheduling while atomic warning in alignment handling code")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/alignment.c