From: Helge Deller <deller@gmx.de>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>, linux-input@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] Input: hp_sdc: shut down kicker timer on module exit
Date: Sat, 12 Sep 2026 22:53:46 +0200 [thread overview]
Message-ID: <42eb83ba-0da2-4986-8f70-43a754a91266@gmx.de> (raw)
In-Reply-To: <20260902154004.3595416-1-runyu.xiao@seu.edu.cn>
On 9/2/26 17:40, Runyu Xiao wrote:
> hp_sdc_kicker() rearms hp_sdc.kicker with mod_timer() after scheduling the
> tasklet. The module exit path uses timer_delete_sync(). That waits for a
> callback already running but can still leave the timer rearmed.
>
> A callback can therefore leave the timer pending while hp_sdc_exit() tears
> down the driver, allowing timer activity to access dismantled driver state.
>
> Use timer_shutdown_sync() for final teardown. It waits for a running
> callback and prevents rearming after module exit begins.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:GPT-5
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Acked-by: Helge Deller <deller@gmx.de>
Helge
> ---
> drivers/input/serio/hp_sdc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
> index 1461ef319..ecf5347b6 100644
> --- a/drivers/input/serio/hp_sdc.c
> +++ b/drivers/input/serio/hp_sdc.c
> @@ -981,7 +981,7 @@ static void hp_sdc_exit(void)
> free_irq(hp_sdc.irq, &hp_sdc);
> write_unlock_irq(&hp_sdc.lock);
>
> - timer_delete_sync(&hp_sdc.kicker);
> + timer_shutdown_sync(&hp_sdc.kicker);
>
> tasklet_kill(&hp_sdc.task);
>
prev parent reply other threads:[~2026-09-12 20:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 15:40 [PATCH] Input: hp_sdc: shut down kicker timer on module exit Runyu Xiao
2026-09-02 15:53 ` sashiko-bot
2026-09-12 20:53 ` Helge Deller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42eb83ba-0da2-4986-8f70-43a754a91266@gmx.de \
--to=deller@gmx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=runyu.xiao@seu.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox