Re: [PATCH v11 4/5] platform/chrome: Protect cros_ec_device lifecycle with revocable
From: Jason Gunthorpe
Date: Wed May 13 2026 - 07:52:23 EST
On Wed, May 13, 2026 at 05:10:42PM +0800, Tzung-Bi Shih wrote:
> The cros_ec_device can be unregistered when the underlying device is
> removed. Other kernel drivers that interact with the EC may hold a
> pointer to the cros_ec_device, creating a risk of a use-after-free
> error if the EC device is removed while still being referenced.
>
> To prevent this, leverage the revocable and convert the underlying
> device drivers to resource providers of cros_ec_device.
>
> ---
> v11:
> - No changes.
Two people are opposing this and yet no changes? Why haven't you
followed my advice to fix the bug in this driver in the obvious way?
Jason