Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4799278rwb; Mon, 8 Aug 2022 07:14:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6IbZpdzu3IGkXvx0+vUtxlYzlqrkRHkUOQqGEenGoWMRWPlwUEqIhECwKiHN6fI9k8gs7H X-Received: by 2002:a17:906:98c8:b0:730:8bfb:6cd with SMTP id zd8-20020a17090698c800b007308bfb06cdmr13310061ejb.334.1659968084333; Mon, 08 Aug 2022 07:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659968084; cv=none; d=google.com; s=arc-20160816; b=lD+HXtrlUbYpfyUXQGp89pxZ6m+LCQO+51oe0l4RiYAkexJHbpB3e7HeCrnQyFn/5q E0BjDImd8nBk7CjPa42f7cuGPexrrNC/u+OEuUrOz3DTqXhWszYHM9NRxTTyNwWfi8oh qJUoAvVZbQ+vwn1bEyXaVVgs4UfpQF586eXdEikHEV80h1oXKQk8wleaUnZkPQPsHYS4 zVqABHpu6chQCfi+4zUuH90vWGPNbqBqzXQX37sIN0JOiTenhqKTBTZ6OPtZSIM7C8j9 v5hQApaJd3XUFVuFwW/UwQwo8pwt0C/C954vaETC7Vb6lcBf+MYNpLUwbYheYKdF33Dm QxFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=gAuPasQJR1qgXtwI72yzz6F0nQC/FTbsBx4YgG+wgS4=; b=v0Lx8+tRAasqfHuIEMChTPtR7QLQE6nAQ19Id2yEzCLFsI4HDtQsut+McDbieMnsms YMm1s63QEjIFyK9TK3fOwKvorEq9mGbcCxZV9uYLWFluiubbCBCQyz9Sh0e8tgui/cEl Qfo9fXJRHiFqkpqSHknJ62L4gkqe60M0DUkipVaHiiKn64GH/8v2pJcSjRRT9ty5vEef upGoo6j3LbXWhMVjdqvj7Mv8w0AxvNTZefOrDKPh2QIHhFQzroFxhgYWW5sTe2ZA7LV8 HRrBSLGyh93MKFlLilI/9WYIgfyEWFVrFYbZ93bDq2kZyLNHoctBmAgqI2mER/j1Ql1R Q6Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zpIYZaRY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=x8qziAUP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 17-20020a170906329100b00730a20dd838si6677540ejw.84.2022.08.08.07.14.18; Mon, 08 Aug 2022 07:14:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zpIYZaRY; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=x8qziAUP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243251AbiHHOCG (ORCPT + 99 others); Mon, 8 Aug 2022 10:02:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237483AbiHHOCA (ORCPT ); Mon, 8 Aug 2022 10:02:00 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD56B7E9 for ; Mon, 8 Aug 2022 07:01:59 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1659967317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gAuPasQJR1qgXtwI72yzz6F0nQC/FTbsBx4YgG+wgS4=; b=zpIYZaRYj0gl1Scsc4nqCkSnBKB8ZxoX+2534wNO5IiPMLj+S7O4YNTkGwGLehPLpcIDsK eQpN5EMP8hUXr3pQp40s56kYpCpXyDfpgZZJW6b3uSVQpHeQomVGfR3E930WnT2z35ObIA A6+g/evNu0Cotqqa2KNMDlp9fVZCMrTTZbrZaco/7xxzmb/r/C0ksV/G7JC+wTEICTXfwx 6dYaJxFK4eWrbWqCSYQmVCMQuDPklNxbu6w5FOhm4KzVp+dBJUVtm7tlN7kG3/oDw4kY1d GA22SXc4GBNDHfsw3f9SWFTKJ3OZFk7d13Aj/RtR/cNMOFB2IooTNdsD5O9Xvw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1659967317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gAuPasQJR1qgXtwI72yzz6F0nQC/FTbsBx4YgG+wgS4=; b=x8qziAUPZReT4VqdSujf3VMv0Sq2nSqjH0HNPh3M3kkJArXiwgpKlGw7CeQHd8YtlTOSjB t7v3N0iIf+7Xw4Bw== To: Duoming Zhou , linux-kernel@vger.kernel.org Cc: jstultz@google.com, sboyd@kernel.org, edumazet@google.com, Duoming Zhou Subject: Re: [PATCH] timers: fix synchronization rules in comments of del_timer_sync In-Reply-To: <20220701085535.17018-1-duoming@zju.edu.cn> References: <20220701085535.17018-1-duoming@zju.edu.cn> Date: Mon, 08 Aug 2022 16:01:57 +0200 Message-ID: <877d3irfze.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01 2022 at 16:55, Duoming Zhou wrote: > - * Synchronization rules: Callers must prevent restarting of the timer, > - * otherwise this function is meaningless. It must not be called from > - * interrupt contexts unless the timer is an irqsafe one. The caller must > - * not hold locks which would prevent completion of the timer's > - * handler. The timer's handler must not call add_timer_on(). Upon exit the > - * timer is not queued and the handler is not running on any CPU. > + * Synchronization rules: Callers must prevent restarting of the timer in > + * other places except for the timer's handler, otherwise this function is > + * meaningless. It must not be called from interrupt contexts unless the > + * timer is an irqsafe one. The caller must not hold locks which would > + * prevent completion of the timer's handler. The timer's handler must > + * not call add_timer_on(). If we are making this correct: What's so special about add_timer_on()? Thanks, tglx