Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1299622rwl; Fri, 4 Nov 2022 12:11:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FibeqmJXzp9kxHsW4XBsA+/UKUdy+H+AtZ17dScmQBNlYXQe8fHKlzvWWbn9CZoxgsP3E X-Received: by 2002:a65:4604:0:b0:470:2ecd:ad52 with SMTP id v4-20020a654604000000b004702ecdad52mr6295601pgq.121.1667589066959; Fri, 04 Nov 2022 12:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667589066; cv=none; d=google.com; s=arc-20160816; b=TpWhnSHEvEaP3UWWXXeh9QBbS8re4IEpgrRB6wvLEPVyEc9pLEn77mX1A/srGSNcIT oWax+7/0/S60ZVI0lb1zlWeZ3jFsLo4Ar3WcPnn5R2pn04UvP1LubCujpHBAZHUtfRRL 9fpw8mQgcfn0IsQsWFZUmtixlmkQWIkPsxuLOmqIYnJHo5x9lzL8nnv/1cjvUg7S1dhH SsgpEG7WT/kjjPILIVq9vVHTKThMveRXrwBsWix2u4p6p08NvdvzKVZEITUXPm8x6G1j ijnq4DXJrPlX2RewfizXhHmNGWls18C3aqtKU2V32Gb+OpiTkZpt4RJ8W+y3186zGYfs NjSg== 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=QMeT3qtLteSkwgpFlKRConn5hknupDbWa0ZTkG9bv6c=; b=E5YtTWAdzB9yu0tJ4SNtJ4bp/wV4ClEjKr+jQf/wEXP3X2BDvrlXx0EXYmddVDgKSt gDjt+RVpBoC/AxbiEWRQM7/Zr6RQNycEy0Fd2UCzS1lFE5OcNqvFliwXtsFazdKDL+n2 TPLELvoThl445cMvcIbAaUXfXmv2e26lgJSqyV7O/R9ADRKdwpQKAbuLYXRbfyTWKL0n EQIoUhlf6bt+sCLCP+bUhHRcpGDzhWQhvIoOELRhk9ZGpMSHaHa3PPmck5VADDCg0X33 QbTnxnmSjnPRHpzV6RIJubNH2LmyFNll1r9U9dvHypMzsIWCAbkyBWXvfv/h9tRI4sYu B6sg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x186-20020a6386c3000000b00462fbd5b46bsi347754pgd.35.2022.11.04.12.10.54; Fri, 04 Nov 2022 12:11:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229540AbiKDS6M convert rfc822-to-8bit (ORCPT + 97 others); Fri, 4 Nov 2022 14:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiKDS6H (ORCPT ); Fri, 4 Nov 2022 14:58:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 224B651C34; Fri, 4 Nov 2022 11:58:07 -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 B0D8C622FD; Fri, 4 Nov 2022 18:58:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA292C433D6; Fri, 4 Nov 2022 18:58:05 +0000 (UTC) Date: Fri, 4 Nov 2022 14:58:04 -0400 From: Steven Rostedt To: Christian =?UTF-8?B?S8O2bmln?= Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Sumit Semwal , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: Re: [RFC][PATCH v3 12/33] timers: dma-buf: Use timer_shutdown_sync() before freeing timer Message-ID: <20221104145804.4ec8404e@rorschach.local.home> In-Reply-To: References: <20221104054053.431922658@goodmis.org> <20221104054914.085569465@goodmis.org> <20221104015444.57f73efb@rorschach.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=UTF-8 Content-Transfer-Encoding: 8BIT 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-kernel@vger.kernel.org On Fri, 4 Nov 2022 08:15:53 +0100 Christian König wrote: > > index fb6e0a6ae2c9..5d3e7b503501 100644 > > --- a/drivers/dma-buf/st-dma-fence.c > > +++ b/drivers/dma-buf/st-dma-fence.c > > @@ -412,7 +412,7 @@ static int test_wait_timeout(void *arg) > > > > err = 0; > > err_free: > > - del_timer_sync(&wt.timer); > > + timer_shutdown_sync(&wt.timer); > > Mhm, what exactly is the benefit of renaming the function? > > Not that I'm against the change, but my thinking is more if there are > more functions which don't re-arm the time than those which do that then > why not forbid it in general? Timers are more often re-armed then not. I had to look for the locations where del_timer*() was called just before freeing, and other locations where they are freed later. I didn't rename del_timer_sync() to timer_shutdown_sync(), this version renamed the new "del_timer_shutdown()" to "timer_shutdown_sync()". Maybe I'm just confused at what you are asking. -- Steve