Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/fault: Correct a few user vs kernel checks wrt WRUSS
In general, page fault errors for WRUSS should be just like get_user(), etc. Fix three bugs in this area: We have a comment that says that, if we can't handle a page fault on a user address due to OOM, we will skip the OOM-kill-and-retry logic. The code checked kernel *privilege*, not kernel mode, so it missed WRUSS. This means that we would malfunction if we got OOM on a WRUSS fault -- this would be a kernel-mode, user-privilege fault, and we would invoke the OOM killer and retry. A failed user access from kernel while a fatal signal is pending should fail even if the instruction in question was WRUSS. do_sigbus() should not send SIGBUS for WRUSS -- it should handle it like any other kernel mode failure. Cc: Dave Hansen <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Andy Lutomirski <[email protected]>
- Loading branch information