|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/x86: irq: Avoid a TOCTOU race in pirq_spin_lock_irq_desc()
On Wed, Jul 22, 2020 at 05:53:00PM +0100, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> Even if we assigned pirq->arch.irq to a variable, a compile is still
> allowed to read pirq->arch.irq multiple time. This means that the value
> checked may be different from the value used to get the desc.
>
> Force the compiler to only do one read access by using read_atomic().
>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
The whole discussion about renaming {write/read}_atomic is orthogonal
to this patch IMO.
Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |