]> git.baikalelectronics.ru Git - kernel.git/commit
xtensa: fix uaccess-related livelock in do_page_fault
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 7 Feb 2021 12:57:58 +0000 (04:57 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 29 Mar 2021 18:25:11 +0000 (11:25 -0700)
commit2ec7675440d8713050a46dbe2d2f60e5c9074ae9
tree370431fbaa75e42e1c97d2dec184de46005ddd9b
parent994f35d5ef4badeb36eb27e63452a1001b6b2a6b
xtensa: fix uaccess-related livelock in do_page_fault

If a uaccess (e.g. get_user()) triggers a fault and there's a
fault signal pending, the handler will return to the uaccess without
having performed a uaccess fault fixup, and so the CPU will immediately
execute the uaccess instruction again, whereupon it will livelock
bouncing between that instruction and the fault handler.

https://lore.kernel.org/lkml/20210121123140.GD48431@C02TD0UTHF1T.local/

Cc: stable@vger.kernel.org
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/mm/fault.c