diff options
Diffstat (limited to 'arch/arm64/mm/fault.c')
-rw-r--r-- | arch/arm64/mm/fault.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 6c8ba25bf6bb..0bb7db41f4fe 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -288,6 +288,13 @@ retry: | |||
288 | VM_FAULT_BADACCESS)))) | 288 | VM_FAULT_BADACCESS)))) |
289 | return 0; | 289 | return 0; |
290 | 290 | ||
291 | /* | ||
292 | * If we are in kernel mode at this point, we have no context to | ||
293 | * handle this fault with. | ||
294 | */ | ||
295 | if (!user_mode(regs)) | ||
296 | goto no_context; | ||
297 | |||
291 | if (fault & VM_FAULT_OOM) { | 298 | if (fault & VM_FAULT_OOM) { |
292 | /* | 299 | /* |
293 | * We ran out of memory, call the OOM killer, and return to | 300 | * We ran out of memory, call the OOM killer, and return to |
@@ -298,13 +305,6 @@ retry: | |||
298 | return 0; | 305 | return 0; |
299 | } | 306 | } |
300 | 307 | ||
301 | /* | ||
302 | * If we are in kernel mode at this point, we have no context to | ||
303 | * handle this fault with. | ||
304 | */ | ||
305 | if (!user_mode(regs)) | ||
306 | goto no_context; | ||
307 | |||
308 | if (fault & VM_FAULT_SIGBUS) { | 308 | if (fault & VM_FAULT_SIGBUS) { |
309 | /* | 309 | /* |
310 | * We had some memory, but were unable to successfully fix up | 310 | * We had some memory, but were unable to successfully fix up |