Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp908638ybx; Wed, 6 Nov 2019 10:10:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyz3wj4ELrCf5K+9XFcl2qGwZvNYk1oWYoCOOvZ5Y6s1aFmXn+oW+8Z8f2xvLOFwp7ECUFo X-Received: by 2002:a17:906:5494:: with SMTP id r20mr35512127ejo.293.1573063839293; Wed, 06 Nov 2019 10:10:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573063839; cv=none; d=google.com; s=arc-20160816; b=FBRP2tt4NFVfn8ge0IXZVSTqbqgzj/V766oxI2wZlPyuNwOq7tZOTXJ+AOI5y01dPl GCSiXmFn2JZrIiXlR9ON6GFGXpO3kirYRz2XtSUVspJCBrP+Iv9ySPA0XRa1+Q6da2bR 7hNQKIPIy+jqVaQMH56vI7EWENO9vIiOBGCp1heTQQhwT5OhylTHFd5EmpXOU2wvjJ2r nlh03NOBOdet8pDpGYKKfpyVgti8JOzXHjOnVnFJftRNXoJ7LV72osbyLAC+aWVvRNr/ 1ITPHOi4+b/klP/OXa6nTfvj7pPUvYSmkZy9DiI5bkAOoIqSnzfbzO/qgJwXJwZA5nB0 lGRQ== 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=YGfaUTiPc0Dq8io2XNnUqg0hHTZcqyOWxgEQECPN7ZM=; b=dlSHZnZ6z8WGWwInhCl9RQxHWuf8sr7WhwZ0qGwM43x8Td2SnMScOgeb1Ik9pXlLAx zyV0PpECEXeV0+hNMz0doX67lvd4RhmKBOWc9pS1JDxFFgtTd4lbwITNQIN8hUO2tMLD SwvUJIEJ2WCjo+xvowGI+jABODQj4xiQxJQ6DJ8nFXugrcaIob7ZakeyX49SEFqVHxcs vbwNgMuk40ZY4jWHZHKr7na7yGWsW9ibptr1bRueuj22b768DaJZKBKYU7HLxGSC1mjh 0izMqUg8jBTp7wcNCfBN3TlJn4zLCrgYWjH2TDcpVaFrAN/1axAPfv1+8JZ3i0IGgj8T i6IQ== 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 s58si12814629edm.45.2019.11.06.10.10.14; Wed, 06 Nov 2019 10:10:39 -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 S1732433AbfKFSJQ (ORCPT + 99 others); Wed, 6 Nov 2019 13:09:16 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:44988 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfKFSJP (ORCPT ); Wed, 6 Nov 2019 13:09:15 -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 1iSPk0-00010x-66; Wed, 06 Nov 2019 19:09:12 +0100 Date: Wed, 6 Nov 2019 19:09:11 +0100 (CET) From: Thomas Gleixner To: Eric Dumazet cc: linux-kernel , Eric Dumazet , syzbot Subject: Re: [PATCH] hrtimer: Annotate lockless access to timer->state In-Reply-To: <20191106174804.74723-1-edumazet@google.com> Message-ID: References: <20191106174804.74723-1-edumazet@google.com> 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: > @@ -1013,8 +1013,9 @@ static void __remove_hrtimer(struct hrtimer *timer, > static inline int > remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base, bool restart) > { > - if (hrtimer_is_queued(timer)) { > - u8 state = timer->state; > + u8 state = timer->state; Shouldn't that be a read once then at least for consistency sake? > + > + if (state & HRTIMER_STATE_ENQUEUED) { > int reprogram; Thanks, tglx