powerpc/mm: Warn on flushing tlb page in kernel context
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>
This commit is contained in:
Родитель
7f43e71e8c
Коммит
c2c896bee0
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче