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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 889EAC4332F for ; Fri, 4 Nov 2022 18:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbiKDS6L convert rfc822-to-8bit (ORCPT ); Fri, 4 Nov 2022 14:58:11 -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 Precedence: bulk List-ID: X-Mailing-List: linux-media@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