Re: [PATCH v2] usb: typec: ucsi: acpi: fix use-after-free on driver removal

From: Huang Wei

Date: Thu Sep 03 2026 - 23:49:57 EST


Hi Iván,

This is a nice piece of work. (And apologies for the duplicate of my
earlier note on v1 -- that was an accidental resend.)

I went and checked the ACPICA side after reading your notes:
acpi_remove_notify_handler() does call acpi_os_wait_events_complete()
on the device-notify path, so the flush argument holds up. The stall
you measured for the v1 ordering is a good catch too -- I was happy
enough with the plain reorder on v1 and would have missed that
ucsi_unregister() depends on the notify path for its completions.

The quiescing + CCI masking looks right to me, and keeping the fix
ACPI-local answers my question about the other backends.

If you do post the harness separately I'd find it useful -- the
ordering comparison alone is worth having in the archives.

Reviewed-by: Huang Wei <huangwei@xxxxxxxxxx>

Thanks,
Huang Wei