From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCBCAC352AA for ; Thu, 26 Sep 2019 15:44:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A30C121D56 for ; Thu, 26 Sep 2019 15:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727329AbfIZPoI (ORCPT ); Thu, 26 Sep 2019 11:44:08 -0400 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:40931 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726984AbfIZPoH (ORCPT ); Thu, 26 Sep 2019 11:44:07 -0400 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id 6B2BD3C0579; Thu, 26 Sep 2019 17:44:05 +0200 (CEST) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vE5FwvmGo7cr; Thu, 26 Sep 2019 17:43:59 +0200 (CEST) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 6FF253C04C0; Thu, 26 Sep 2019 17:43:59 +0200 (CEST) Received: from vmlxhi-102.adit-jv.com (10.72.93.184) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Thu, 26 Sep 2019 17:43:58 +0200 Date: Thu, 26 Sep 2019 17:43:56 +0200 From: Eugeniu Rosca To: Balasubramani Vivekanandan CC: , , , , , , Eugeniu Rosca , Eugeniu Rosca Subject: Re: [PATCH V3 1/1] tick: broadcast-hrtimer: Fix a race in bc_set_next Message-ID: <20190926154356.GA29221@vmlxhi-102.adit-jv.com> References: <20190926135101.12102-1-balasubramani_vivekanandan@mentor.com> <20190926135101.12102-2-balasubramani_vivekanandan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190926135101.12102-2-balasubramani_vivekanandan@mentor.com> User-Agent: Mutt/1.12.1+40 (7f8642d4ee82) (2019-06-28) X-Originating-IP: [10.72.93.184] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 26, 2019 at 03:51:01PM +0200, Balasubramani Vivekanandan wrote: > When a cpu requests broadcasting, before starting the tick broadcast > hrtimer, bc_set_next() checks if the timer callback (bc_handler) is > active using hrtimer_try_to_cancel(). But hrtimer_try_to_cancel() does > not provide the required synchronization when the callback is active on > other core. [..] > diff --git a/kernel/time/tick-broadcast-hrtimer.c b/kernel/time/tick-broadcast-hrtimer.c > index c1f5bb590b5e..f070f9734792 100644 > --- a/kernel/time/tick-broadcast-hrtimer.c > +++ b/kernel/time/tick-broadcast-hrtimer.c [..] FWIW, the patch seems to fix the very first commit adding hrtimer broadcast, i.e. v3.15-rc1 commit 5d1638acb9f62f ("tick: Introduce hrtimer based broadcast"), so maybe adding a Fixes: tag could be relevant/beneficial for the stable trees? -- Best Regards, Eugeniu