projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f43e71
)
powerpc/mm: Warn on flushing tlb page in kernel context
author
Arseny Solokha
<asolokha@kb.kras.ru>
Wed, 4 Feb 2015 02:18:02 +0000
(13:18 +1100)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 4 Feb 2015 02:19:27 +0000
(13:19 +1100)
Function __flush_tlb_page() must only be called for user contexts, so
put in extra hardening to warn on calling it for kernel context.
Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/tlb_nohash.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/powerpc/mm/tlb_nohash.c
b/arch/powerpc/mm/tlb_nohash.c
index ab0616b0e6c24eb83732e94ba0b4b23823038031..cbd3d069897f61d11c8c4497700f1d746178a0f7 100644
(file)
--- a/
arch/powerpc/mm/tlb_nohash.c
+++ b/
arch/powerpc/mm/tlb_nohash.c
@@
-284,7
+284,11
@@
void __flush_tlb_page(struct mm_struct *mm, unsigned long vmaddr,
struct cpumask *cpu_mask;
unsigned int pid;
- if (unlikely(!mm))
+ /*
+ * This function as well as __local_flush_tlb_page() must only be called
+ * for user contexts.
+ */
+ if (unlikely(WARN_ON(!mm)))
return;
preempt_disable();