From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing timers Date: Sat, 5 Nov 2022 10:47:30 -0400 Message-ID: <20221105104730.2bfd6740@rorschach.local.home> References: <20221105060024.598488967@goodmis.org> <20221105141817.GF1606271@roeck-us.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20221105141817.GF1606271@roeck-us.net> List-ID: Content-Type: text/plain; charset="us-ascii" To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Stephen Boyd , Anna-Maria Gleixner , Andrew Morton , rcu@vger.kernel.org, linux-doc@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-edac@vger.kernel.org, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-acpi@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-pm@vger.kernel.org, drbd-dev@lists.linbit.com, linux-bluetooth@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, intel-gfx@lists.freedesktop.org On Sat, 5 Nov 2022 07:18:17 -0700 Guenter Roeck wrote: > Just in case you didn't notice: > > Looking through the resulting code, I think some of the remaining > calls to del_singleshot_timer_sync() can be converted as well. > > The calls in drivers/staging/wlan-ng/prism2usb.c:prism2sta_disconnect_usb() > are obvious (the containing data structure is freed in the same function). > For drivers/char/tpm/tpm-dev-common.c:tpm_common_release(), the containing > data structure is freed in the calling code. Well, actually it is. In patch 5/38: -#define del_singleshot_timer_sync(t) del_timer_sync(t) +#define del_singleshot_timer_sync(t) timer_shutdown_sync(t) This was the reason for patch 1. It was the only user of that function that reused the timer after calling that function. -- Steve