Re: [PATCH] locking/mutex: Mark racy reads of owner->on_cpu

From: Thomas Gleixner
Date: Fri Dec 17 2021 - 16:41:55 EST


On Thu, Dec 02 2021 at 10:46, Waiman Long wrote:
> On 12/2/21 06:53, Marco Elver wrote:
> I would like to see owner_on_cpu() extracted out from
> kernel/locking/rwsem.c into include/linux/sched.h right after
> vcpu_is_preempted(), for instance, and with READ_ONCE() added. Then it
> can be used in mutex.c as well. This problem is common to both mutex and
> rwsem.

And rtmutex.c