[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1911062316310.1869@nanos.tec.linutronix.de>
Date: Wed, 6 Nov 2019 23:16:51 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Eric Dumazet <edumazet@...gle.com>
cc: LKML <linux-kernel@...r.kernel.org>,
linux-tip-commits@...r.kernel.org,
syzbot <syzkaller@...glegroups.com>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>
Subject: Re: [tip: timers/core] hrtimer: Annotate lockless access to
timer->state
On Wed, 6 Nov 2019, Eric Dumazet wrote:
> > -static inline int hrtimer_is_queued(struct hrtimer *timer)
> > +static inline bool hrtimer_is_queued(struct hrtimer *timer)
> > {
> > - return timer->state & HRTIMER_STATE_ENQUEUED;
> > + /* The READ_ONCE pairs with the update functions of timer->state */
> > + return !!READ_ONCE(timer->state) & HRTIMER_STATE_ENQUEUED;
>
> You probably meant :
>
> return !!(READ_ONCE(timer->state) & HRTIMER_STATE_ENQUEUED);
>
> Sorry for not spotting this earlier.
Yes, I'm a moron....
Powered by blists - more mailing lists