提交 c2c896be 编写于 作者: A Arseny Solokha 提交者: Michael Ellerman

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: NArseny Solokha <asolokha@kb.kras.ru>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 7f43e71e
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册