All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hongyan Xu" <getshell@seu.edu.cn>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: host: ehci-atmel: stop clocks before releasing HCD
Date: Sun, 15 Nov 2026 11:58:25 +0000	[thread overview]
Message-ID: <sashiko-outbox-215468@kernel.org> (raw)
In-Reply-To: <179474328429.103840.11561415733183356947@seu.edu.cn>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: ehci-atmel: Fixes tag cites 501c9c0802d9 instead of
  7baddacbe1bc
--

commit 01c8113ae4f3e9e4bce884feb37af84c2ce05255
Author: Hongyan Xu <getshell@seu.edu.cn>

> usb: host: ehci-atmel: stop clocks before releasing HCD
>
> usb_put_hcd() can release the HCD and its private data. Calling
> atmel_stop_ehci() afterwards retrieves that HCD from platform data
> and accesses its private clock state.
>
> Stop the controller clocks after usb_remove_hcd() has quiesced the
> host, but before dropping the driver's HCD reference. This matches
> the probe error unwind, which already stops the clocks before
> usb_put_hcd().
>
> Found by the author's in-house static analysis tool.
>
> Fixes: 501c9c0802d9 ("USB: at91: Add USB EHCI driver for at91sam9g45 series")
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/all/20260806060557.1747-1-getshell@seu.edu.cn/
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
> Signed-off-by: Zehao Gao <gaozehao@iie.ac.cn>

[Severity: Low]
In 501c9c0802d9 ("USB: at91: Add USB EHCI driver for at91sam9g45 series"),
the clock state was stored in file-scope static variables and
atmel_stop_ehci() did not access hcd or its private data.  The clocks were
moved into struct atmel_ehci_priv inside hcd->hcd_priv and dereferenced in
atmel_stop_ehci() by 7baddacbe1bc ("USB: host: ehci-atmel: Move global
variables to private struct").

Should the Fixes tag be:

  Fixes: 7baddacbe1bc ("USB: host: ehci-atmel: Move global variables to private struct")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/179474328429.103840.11561415733183356947@seu.edu.cn?part=1

      reply	other threads:[~2026-11-15 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 11:48 [PATCH v2] usb: host: ehci-atmel: stop clocks before releasing HCD Hongyan Xu
2026-11-15 11:58 ` sashiko-bot [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=sashiko-outbox-215468@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=getshell@seu.edu.cn \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.