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 001B4FA3740 for ; Thu, 27 Oct 2022 21:21:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236758AbiJ0VV4 (ORCPT ); Thu, 27 Oct 2022 17:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235935AbiJ0VVz (ORCPT ); Thu, 27 Oct 2022 17:21:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84CD85924B; Thu, 27 Oct 2022 14:21:54 -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 ams.source.kernel.org (Postfix) with ESMTPS id 438BEB824DD; Thu, 27 Oct 2022 21:21:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2109BC433C1; Thu, 27 Oct 2022 21:21:50 +0000 (UTC) Date: Thu, 27 Oct 2022 17:22:03 -0400 From: Steven Rostedt To: Alan Stern Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Greg Kroah-Hartman , Felipe Balbi , Johan Hovold , Mathias Nyman , Kai-Heng Feng , Matthias Kaehlcke , Michael Grzeschik , Bhuvanesh Surachari , Dan Carpenter , linux-usb@vger.kernel.org Subject: Re: [RFC][PATCH v2 20/31] timers: usb: Use del_timer_shutdown() before freeing timer Message-ID: <20221027172203.052a2154@gandalf.local.home> In-Reply-To: <20221027164227.40225b1f@gandalf.local.home> References: <20221027150525.753064657@goodmis.org> <20221027150928.983388020@goodmis.org> <20221027164227.40225b1f@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Oct 2022 16:42:27 -0400 Steven Rostedt wrote: > On Thu, 27 Oct 2022 16:38:19 -0400 > Alan Stern wrote: > > > On Thu, Oct 27, 2022 at 11:05:45AM -0400, Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > > > Before a timer is freed, del_timer_shutdown() must be called. > > > > Is this supposed to be true for all timers? Because the USB subsystem > > contains an awful lot more timers than just the two you touched in this > > patch. > > Yes, and this does mean that we are going to have to painstakingly find and > fix ever one of them. This is why the last patch updates > DEBUG_OBJECTS_TIMERS to detect cases where I miss. BTW, as del_timer_shutdown() prevents the timer from being re-armed, there are lots of timers in the kernel where I did not touch, because I could not tell if the del_timer_sync() or the buggy del_timer() calls were for it to be freed, or for some other legitimate reason, and I just stayed well enough alone. -- Steve