From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96BA533120D; Sat, 7 Feb 2026 15:43:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770479030; cv=none; b=eRV/e29h5j6LLXj04LYEji0wb7crACSwGUTHEwv2tCts8GY1fYbGdP8AQBmA08qm1y1FPiNWhKjk6UD/8SrGIbE0CrwnnS0AeAlyyT5Jzf+T6Fy8niNesSwFxh8N/NpQ2M+4BQ6tJlf5u3HMjNZRHUFTKeY0ZRCl77ut0mCcd/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770479030; c=relaxed/simple; bh=ywzTH43mCnDOKbkp8Nja+ZZ+bVgMFs3MH7pjWrUV5KA=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=mI6BCb0bErMNvf+CKbsbNhT4xPufxqtlzJRDFqeF5e8F+t0K1HyNtkrV8KmgQqwWWPmcdgVDBfk9ErWwsJR/+4S9SMAL11KW0Df3+n4UYUyKB7M1Onrqh3EhrB3P8wX2F2neiJA8tbj54HgBozBiNdnZcE/k1FBgjYzgrSOIAus= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=inb1cXOO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="inb1cXOO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D45C6C116D0; Sat, 7 Feb 2026 15:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770479030; bh=ywzTH43mCnDOKbkp8Nja+ZZ+bVgMFs3MH7pjWrUV5KA=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=inb1cXOOXI2W5B7misD9f5DXCQwyhkbV8Bj+7Z2gieQPonp7s5HVaubbImFPxPSRp 0EKa/r7ACkMwjzJa4FJUrbYT43qrRzPRCBIzDibNk6WAlziLwSZckNNGvHRKIexrZH 2rNf3HjOhP89emgmCfuZkRjoa5D9S1d9yEsbD3rE= Subject: Patch "timers: Update the documentation to reflect on the new timer_shutdown() API" has been added to the 5.15-stable tree To: Julia.Lawall@inria.fr,aha310510@gmail.com,akpm@linux-foundation.org,anna-maria@linutronix.de,arnd@arndb.de,gregkh@linuxfoundation.org,jacob.e.keller@intel.com,linux-staging@lists.linux.dev,linux@roeck-us.net,luiz.dentz@gmail.com,marcel@holtmann.org,maz@kernel.org,peterz@infradead.org,rostedt@goodmis.org,sboyd@kernel.org,tglx@linutronix.de,viresh.kumar@linaro.org Cc: From: Date: Sat, 07 Feb 2026 16:43:05 +0100 In-Reply-To: <20251128160539.358938-14-aha310510@gmail.com> Message-ID: <2026020705-denial-crabgrass-1926@gregkh> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore This is a note to let you know that I've just added the patch titled timers: Update the documentation to reflect on the new timer_shutdown() API to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: timers-update-the-documentation-to-reflect-on-the-new-timer_shutdown-api.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From aha310510@gmail.com Fri Nov 28 17:06:59 2025 From: Jeongjun Park Date: Sat, 29 Nov 2025 01:05:38 +0900 Subject: timers: Update the documentation to reflect on the new timer_shutdown() API To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, tglx@linutronix.de, Julia.Lawall@inria.fr, akpm@linux-foundation.org, anna-maria@linutronix.de, arnd@arndb.de, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux@roeck-us.net, luiz.dentz@gmail.com, marcel@holtmann.org, maz@kernel.org, peterz@infradead.org, rostedt@goodmis.org, sboyd@kernel.org, viresh.kumar@linaro.org, aha310510@gmail.com, linux-staging@lists.linux.dev, Jacob Keller Message-ID: <20251128160539.358938-14-aha310510@gmail.com> From: "Steven Rostedt (Google)" [ Upstream commit a31323bef2b66455920d054b160c17d4240f8fd4 ] In order to make sure that a timer is not re-armed after it is stopped before freeing, a new shutdown state is added to the timer code. The API timer_shutdown_sync() and timer_shutdown() must be called before the object that holds the timer can be freed. Update the documentation to reflect this new workflow. [ tglx: Updated to the new semantics and updated the zh_CN version ] Signed-off-by: Steven Rostedt (Google) Signed-off-by: Thomas Gleixner Tested-by: Guenter Roeck Reviewed-by: Jacob Keller Reviewed-by: Anna-Maria Behnsen Link: https://lore.kernel.org/r/20221110064147.712934793@goodmis.org Link: https://lore.kernel.org/r/20221123201625.375284489@linutronix.de Signed-off-by: Jeongjun Park Signed-off-by: Greg Kroah-Hartman --- Documentation/RCU/Design/Requirements/Requirements.rst | 2 +- Documentation/core-api/local_ops.rst | 2 +- Documentation/kernel-hacking/locking.rst | 5 +++++ Documentation/translations/zh_CN/core-api/local_ops.rst | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) --- a/Documentation/RCU/Design/Requirements/Requirements.rst +++ b/Documentation/RCU/Design/Requirements/Requirements.rst @@ -1858,7 +1858,7 @@ unloaded. After a given module has been one of its functions results in a segmentation fault. The module-unload functions must therefore cancel any delayed calls to loadable-module functions, for example, any outstanding mod_timer() must be dealt -with via timer_delete_sync() or similar. +with via timer_shutdown_sync() or similar. Unfortunately, there is no way to cancel an RCU callback; once you invoke call_rcu(), the callback function is eventually going to be --- a/Documentation/core-api/local_ops.rst +++ b/Documentation/core-api/local_ops.rst @@ -191,7 +191,7 @@ Here is a sample module which implements static void __exit test_exit(void) { - timer_delete_sync(&test_timer); + timer_shutdown_sync(&test_timer); } module_init(test_init); --- a/Documentation/kernel-hacking/locking.rst +++ b/Documentation/kernel-hacking/locking.rst @@ -1010,6 +1010,11 @@ calling add_timer() at the end of their Because this is a fairly common case which is prone to races, you should use timer_delete_sync() (``include/linux/timer.h``) to +Before freeing a timer, timer_shutdown() or timer_shutdown_sync() should be +called which will keep it from being rearmed. Any subsequent attempt to +rearm the timer will be silently ignored by the core code. + + Locking Speed ============= --- a/Documentation/translations/zh_CN/core-api/local_ops.rst +++ b/Documentation/translations/zh_CN/core-api/local_ops.rst @@ -185,7 +185,7 @@ UP之间没有不同的行为,在你 static void __exit test_exit(void) { - timer_delete_sync(&test_timer); + timer_shutdown_sync(&test_timer); } module_init(test_init); Patches currently in stable-queue which might be from aha310510@gmail.com are queue-5.15/timers-update-the-documentation-to-reflect-on-the-new-timer_shutdown-api.patch queue-5.15/clocksource-drivers-arm_arch_timer-do-not-use-timer-namespace-for-timer_shutdown-function.patch queue-5.15/timers-split-del_timer-to-prepare-for-shutdown-mode.patch queue-5.15/arm-spear-do-not-use-timer-namespace-for-timer_shutdown-function.patch queue-5.15/timers-add-shutdown-mechanism-to-the-internal-functions.patch queue-5.15/timers-provide-timer_shutdown.patch queue-5.15/timers-rename-del_timer-to-timer_delete.patch queue-5.15/timers-replace-bug_on-s.patch queue-5.15/bluetooth-hci_qca-fix-the-teardown-problem-for-real.patch queue-5.15/documentation-replace-del_timer-del_timer_sync.patch queue-5.15/documentation-remove-bogus-claim-about-del_timer_sync.patch queue-5.15/timers-silently-ignore-timers-with-a-null-function.patch queue-5.15/timers-get-rid-of-del_singleshot_timer_sync.patch queue-5.15/clocksource-drivers-sp804-do-not-use-timer-namespace-for-timer_shutdown-function.patch