From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Linkai Gong <gonglinkai@kylinos.cn>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Xin Ji <xji@analogixsemi.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3] usb: typec: anx7411 - stop the IRQ before destroying the workqueue
Date: Mon, 14 Sep 2026 13:44:20 +0200 [thread overview]
Message-ID: <aqfeFD-2RVMaO4u9@black.igk.intel.com> (raw)
In-Reply-To: <20260910011150.2966843-1-gonglinkai@kylinos.cn>
On Thu, Sep 10, 2026 at 09:11:50AM +0800, Linkai Gong wrote:
> The IRQ is devm-managed, so it can still queue plat->work while
> remove() is tearing the queue down. Disable it first.
>
> Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> v3:
> - add Cc: stable (Heikki)
>
> v2:
> - keep the minimal remove() race fix; drop the workqueue later if wanted
> (code unchanged from v1)
>
> drivers/usb/typec/anx7411.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
> index 41df115912b9..c3d36da692e4 100644
> --- a/drivers/usb/typec/anx7411.c
> +++ b/drivers/usb/typec/anx7411.c
> @@ -1566,8 +1566,11 @@ static void anx7411_i2c_remove(struct i2c_client *client)
> anx7411_partner_unregister_altmode(plat);
> anx7411_unregister_partner(plat);
>
> - if (plat->workqueue)
> + if (plat->workqueue) {
> + disable_irq(plat->intp_irq);
> + cancel_work_sync(&plat->work);
> destroy_workqueue(plat->workqueue);
> + }
>
> i2c_unregister_device(plat->spi_client);
>
> --
> 2.25.1
--
heikki
prev parent reply other threads:[~2026-09-14 11:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 8:22 [PATCH] usb: typec: anx7411 - stop the IRQ before destroying the workqueue Linkai Gong
2026-09-07 10:53 ` Heikki Krogerus
2026-09-08 3:16 ` Linkai Gong
2026-09-08 6:02 ` Linkai Gong
2026-09-08 6:03 ` [PATCH v2] " Linkai Gong
2026-09-09 14:23 ` Heikki Krogerus
2026-09-10 1:13 ` Linkai Gong
2026-09-10 1:11 ` [PATCH v3] " Linkai Gong
2026-09-14 11:44 ` Heikki Krogerus [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=aqfeFD-2RVMaO4u9@black.igk.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gonglinkai@kylinos.cn \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xji@analogixsemi.com \
/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.