Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [PATCH 2/2] locking/rwbase_rt: Lockless reader waking up a writer | Date | Mon, 13 Sep 2021 14:20:49 +0200 |
| |
On Wed, Sep 01 2021 at 15:28, Davidlohr Bueso wrote: > diff --git a/kernel/locking/rwbase_rt.c b/kernel/locking/rwbase_rt.c > index 4ba15088e640..3444bc709973 100644 > --- a/kernel/locking/rwbase_rt.c > +++ b/kernel/locking/rwbase_rt.c > @@ -141,6 +141,7 @@ static void __sched __rwbase_read_unlock(struct rwbase_rt *rwb, > { > struct rt_mutex_base *rtm = &rwb->rtmutex; > struct task_struct *owner; > + DEFINE_WAKE_Q(wake_q); > > raw_spin_lock_irq(&rtm->wait_lock); > /* > @@ -151,9 +152,10 @@ static void __sched __rwbase_read_unlock(struct rwbase_rt *rwb, > */ > owner = rt_mutex_owner(rtm); > if (owner) > - wake_up_state(owner, state); > + wake_q_add(&wake_q, owner);
That's broken for rw_locks. See commit 456cfbc65cd072f4f53936ee5a37eb1447a7d3ba.
Thanks,
tglx
| |