Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1338700rwi; Thu, 27 Oct 2022 14:33:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70y/lqhD12vRdug5vfysrpxLrE8dlHT84TyTLZ4KPs0g6wBR5Sm/nWuUDqPGz2bxp6j8aZ X-Received: by 2002:a17:906:cc48:b0:7a8:4a3b:11f7 with SMTP id mm8-20020a170906cc4800b007a84a3b11f7mr20841540ejb.388.1666906437319; Thu, 27 Oct 2022 14:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666906437; cv=none; d=google.com; s=arc-20160816; b=QWAHISXOguz7cseJTBH17v8UCNUHi43pnYXMkd85JQ4PXFxK/asr+vc92SZry4uNE/ iWpbuem2e5C5BytNiaue44jT7qCvmY5kqCgwyUf9i15ubBAfQSIW4ZGCD9fnnO2jvb7T J26EOeqKY88xFkss/Xz96VOEgtYLMo8WMdJrWrCbvqB1Rg0baW1Dbgs6WOhELDO+La57 /Pkh4BRLiTyAgfkbRa6b2XZJOnnOvA8/vBdUzmwjhXcaloGm46OIs9pQRsa3GA5YJwWz wU4GYPWyB0WfaVpllOgHEnM2nbSyVAEbhwJtRyf524999iT+3LFNIHmbDhD2+j/BlcF6 t6GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ZgoAc2n1S/TAdZ9PVU1QXtjI7scOjqwNgIYEVOOfC5s=; b=pWVqU0VMIb+sgTvTlt0Yo+Z5xLyw6yYrRq0M/GHZgEvOYmTEEtI8Vbz/yX37Q08hIL NDViAGPKQ6Sh9HquS2qoXCnpW4bkBhDonUj7ymgxtHbZ7FFpC9LP6TovWg3YCHYQ35QF w/17HF6e92mboU550oitIf7xSN6HwPe2CSoC1dyzuVfVEiQ4NWBgLE9KnXQdjPv6q7Ui TsRXFuQLmHbDkdBj3uTuFRf4jGnkz2yQpJRalSW/bQdsrDLbUaQp4pUv2tb86splENeA DXUXnZxCdLeBpcW6gaOPbEj1rEdo2NnULqSEdEXuGw3dU3g0TAZSWG5xeso5t2DxzFgf NV5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk34-20020a1709077fa200b007a2d966eeccsi2788278ejc.686.2022.10.27.14.33.39; Thu, 27 Oct 2022 14:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236858AbiJ0VPq (ORCPT + 65 others); Thu, 27 Oct 2022 17:15:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236348AbiJ0VPp (ORCPT ); Thu, 27 Oct 2022 17:15:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D2564520D; Thu, 27 Oct 2022 14:15:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3845E624F7; Thu, 27 Oct 2022 21:15:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C247BC433C1; Thu, 27 Oct 2022 21:15:40 +0000 (UTC) Date: Thu, 27 Oct 2022 17:15:55 -0400 From: Steven Rostedt To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Stephen Boyd , Guenter Roeck , Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Mirko Lindner , Stephen Hemminger , Martin KaFai Lau , Alexei Starovoitov , Kuniyuki Iwashima , Pavel Begunkov , Menglong Dong , linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, bridge@lists.linux-foundation.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, lvs-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net Subject: Re: [RFC][PATCH v2 19/31] timers: net: Use del_timer_shutdown() before freeing timer Message-ID: <20221027171555.7fcd27ee@gandalf.local.home> In-Reply-To: <20221027170720.31497319@gandalf.local.home> References: <20221027150525.753064657@goodmis.org> <20221027150928.780676863@goodmis.org> <20221027155513.60b211e2@gandalf.local.home> <20221027163453.383bbf8e@gandalf.local.home> <20221027170720.31497319@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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-wireless@vger.kernel.org On Thu, 27 Oct 2022 17:07:20 -0400 Steven Rostedt wrote: > > And maybe that function can also disallow any future re-arming even > > for the case where the timer couldn't be actively removed. The naming of the functions will depend on this. If the async version always shuts down the timer, then we should have the interface be: del_timer_shutdown() <- async del_timer_shutdown_sync <- sync As it would match the del_timer() and del_timer_sync() semantics. If shutdown only happens if the timer is removed, then I believe the current approach of del_timer_shutdown() being synchronous and del_timer_try_shutdown() being async is the way to go, as it follows more the semantics of mutex_lock() and mutex_trylock(). -- Steve