Re: [PATCH v3 1/4] x86/membarrier: Get rid of a dubious optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 3, 2020 at 9:07 PM Andy Lutomirski <luto@xxxxxxxxxx> wrote:
>
> sync_core_before_usermode() had an incorrect optimization.  If we're
> in an IRQ, we can get to usermode without IRET -- we just have to
> schedule to a different task in the same mm and do SYSRET.
> Fortunately, there were no callers of sync_core_before_usermode()
> that could have had in_irq() or in_nmi() equal to true, because it's
> only ever called from the scheduler.
>
> While we're at it, clarify a related comment.
>

Fixes: ac1ab12a3e6e ("lockin/x86: Implement sync_core_before_usermode()")

> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxx>



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux