X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Funicore32%2Fmm%2Ffault.c;h=8ed3c4509d846d3089f34466ed2ffebee23cf890;hb=871341023c771ad233620b7a1fb3d9c7031c4e5c;hp=f9b5c10bccee96e8838484aaf6effc39b3c89bd1;hpb=7b5c4a65cc27f017c170b025f8d6d75dabb11c6f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index f9b5c10..8ed3c45 100644 --- a/arch/unicore32/mm/fault.c +++ b/arch/unicore32/mm/fault.c @@ -278,6 +278,13 @@ retry: (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS)))) return 0; + /* + * If we are in kernel mode at this point, we + * have no context to handle this fault with. + */ + if (!user_mode(regs)) + goto no_context; + if (fault & VM_FAULT_OOM) { /* * We ran out of memory, call the OOM killer, and return to @@ -288,13 +295,6 @@ retry: return 0; } - /* - * If we are in kernel mode at this point, we - * have no context to handle this fault with. - */ - if (!user_mode(regs)) - goto no_context; - if (fault & VM_FAULT_SIGBUS) { /* * We had some memory, but were unable to