Re: [PATCH] platform/chrome: cros_ec_typec: Stop altmode work before unregistering ports

From: Jameson Thies

Date: Mon Sep 21 2026 - 19:52:43 EST


On Thu, Sep 17, 2026 at 1:42 PM Myeonghun Pak <mhun512@xxxxxxxxx> wrote:
>
> DisplayPort and Thunderbolt port altmodes queue work to deliver VDM
> responses to their partners. Port teardown only cancels port_work and
> then unregisters the partner and port altmodes, leaving the separate
> altmode work able to access released altmode data.
>
> Disable and drain each port altmode's work before unregistering the
> partner altmodes. Disabling also prevents a partner callback from
> requeueing the work while its driver is being removed. Use the common
> port teardown path so probe error handling is covered as well.
>
> This issue was identified during our ongoing static-analysis research
> while reviewing kernel code.
>
> Fixes: dbb3fc0ffa95 ("platform/chrome: cros_ec_typec: Displayport support")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
> Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
> Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>

Reviewed-by: Jameson Thies <jthies@xxxxxxxxxx>

- Jameson