[lkml]   [2017]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: x86/pti: smp_processor_id() called while preemptible in resume-from-sleep
On Sat, Dec 30, 2017 at 12:28 PM, Thomas Gleixner <> wrote:
> That preempt_disable()/enable() was added with:
> commit 5cf0791da5c162ebc14b01eb01631cfa7ed4fa6e
> Author: Sebastian Andrzej Siewior <>
> Date: Fri Aug 5 15:37:39 2016 +0200
> x86/mm: Disable preemption during CR3 read+write
> So we need to look at that scenario before removing it.

Good point, but I think that was actually a mis-feature of the old
"__flush_tlb_up()" implementation that Andy got rid of in commit
ce4a4e565f52 ("x86/mm: Remove the UP asm/tlbflush.h code, always use
the (formerly) SMP code").

So the code sequence that that commit talks about no longer exists.

Instead, we now have the call to __flush_tlb() inside a
get_cpu/put_cpu, which is preempt-safe even on UP (despite the CPU
number obviously being fixed).

So I think Dave is right: we should just remove the
preempt_disable/endable. But adding a


might still be a good idea.


 \ /
  Last update: 2017-12-30 21:46    [W:0.046 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site