Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp126182ybx; Wed, 6 Nov 2019 14:19:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzBP8Fuukn5pGDzD8CzGPgZIAXzqPLhMTkUZdzuSMGaRgeeS+AGsGzYScIGHiDOKopSXh8t X-Received: by 2002:aa7:dbd4:: with SMTP id v20mr120893edt.58.1573078740129; Wed, 06 Nov 2019 14:19:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573078740; cv=none; d=google.com; s=arc-20160816; b=GVcA87KBaySnkeMlnq/X7bCe1XX+Njp9zrZmXb/tBJ2sDxp5cJm+7MQXAzfvR2IDMl x4y4Orwh7e6z+p5P8JduLL7UsAFfHYRasLrA1OXbUhQyDsnMsR5bwjWtuUm1Aihc2YkM sEzncbmMzyIPFMt8gdFWE2s9XBKHIMqMBNiIMBJmjsBHuP1LMo6/Y4HMNxoRAf9DdUmz eXV59h7Tqe9vWKK7CG/UfXiL5Pey0ZQ5gOUBUqYMZdF5yDPSW9s5J52EM4rg7e6ixkYm PuqYDx4LMDpblKJSPNA+7ln5+q9y9mbTY07+YRQLR7UT7DhegX0L3Old+kPaqqb87zMH EEHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Abyn1OYNr/kf4MOYdR1VtPJogUqqAne0bVY/JiSvxEg=; b=LYkJvqmNiv7rkaTeYLw+3wsFVpEjBRjVfxUD9YY2QCd9vFegNqF9ObVqDTF3tA/gNy YwhClzJHNr7oShYhY86K/E5il+uv57zKOXjgWyoK5Xw+VFchSFQLjyldg6WRZalNf/sg vsrwhzKOX0PIiDmcEcUa9CP8fKtxeFPV6jNTqFAgchvO/btUwkLOs/Ly1/wZaIh0+Qci j9ydMxos7VnxBkCpoTNlZjldI4npTVR/soXfGlE754a3k6eOaoxsd8ExdLVnKyitVvM3 WHyqwaS7g975yMCkcC/mRbS3TaxI+EkTWjqKA0SQCu2bJvsSObbVQdl60DKyQ4yDH5ss IICw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si13969855ede.12.2019.11.06.14.18.35; Wed, 06 Nov 2019 14:19:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732493AbfKFWQy (ORCPT + 99 others); Wed, 6 Nov 2019 17:16:54 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45430 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbfKFWQy (ORCPT ); Wed, 6 Nov 2019 17:16:54 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iSTbf-0004AT-Vz; Wed, 06 Nov 2019 23:16:52 +0100 Date: Wed, 6 Nov 2019 23:16:51 +0100 (CET) From: Thomas Gleixner To: Eric Dumazet cc: LKML , linux-tip-commits@vger.kernel.org, syzbot , Ingo Molnar , Borislav Petkov Subject: Re: [tip: timers/core] hrtimer: Annotate lockless access to timer->state In-Reply-To: Message-ID: References: <20191106174804.74723-1-edumazet@google.com> <157307438959.29376.9644507314555163943.tip-bot2@tip-bot2> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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....