mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dipen Patel <dipenp@nvidia.com>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	timestamp@lists.linux.dev, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] hte: tegra194-test: shut down timer before GPIO release
Date: Tue, 8 Sep 2026 11:42:32 -0700	[thread overview]
Message-ID: <fe711e37-2ebe-4c34-946f-2ebe8eb8c17f@nvidia.com> (raw)
In-Reply-To: <20260904061137.4037269-1-runyu.xiao@seu.edu.cn>

On 9/3/26 11:11 PM, Runyu Xiao wrote:
> tegra_hte_test_remove() releases GPIO descriptors before stopping
> hte.timer. gpio_timer_cb() accesses hte.gpio_out and rearms the timer, so
> a callback concurrent with remove can use a released descriptor and rearm
> after teardown.
> 
> Shut down the timer before releasing the GPIO descriptors.
> timer_shutdown_sync() waits for a running callback and prevents it from
> being rearmed.
> 
> Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver")
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:GPT-5
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
> ---
>  drivers/hte/hte-tegra194-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c
> index 32907d951..cca33868f 100644
> --- a/drivers/hte/hte-tegra194-test.c
> +++ b/drivers/hte/hte-tegra194-test.c
> @@ -217,10 +217,10 @@ static void tegra_hte_test_remove(struct platform_device *pdev)
>  {
>  	(void)pdev;
>  
> +	timer_shutdown_sync(&hte.timer);
>  	free_irq(hte.gpio_in_irq, &hte);
>  	gpiod_put(hte.gpio_in);
>  	gpiod_put(hte.gpio_out);
> -	timer_delete_sync(&hte.timer);
>  }
>  
>  static struct platform_driver tegra_hte_test_driver = {
Acked-by: Dipen Patel <dipenp@nvidia.com>

      reply	other threads:[~2026-09-08 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  6:11 Runyu Xiao
2026-09-08 18:42 ` Dipen Patel [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=fe711e37-2ebe-4c34-946f-2ebe8eb8c17f@nvidia.com \
    --to=dipenp@nvidia.com \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=timestamp@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®