Re: [PATCH v10 8/9] platform/chrome: Protect cros_ec_device lifecycle with revocable
From: Jason Gunthorpe
Date: Thu May 14 2026 - 12:06:11 EST
On Thu, May 14, 2026 at 03:33:55AM +0000, Tzung-Bi Shih wrote:
> > Given you say this is such a bug I think you really should be sending
> > a series that is patches 5 through 7 from the other series and a
> > simple rwsem instead of misc_deregister_sync() to deal with this bug
> > ASAP. No need to complicate a simple bug fix in a driver with all
> > these core changes.
>
> Apologies for missing this suggestion.
>
> For "patches 5 through 7 from the other series" I guess you're referring:
> - https://lore.kernel.org/all/20260427134659.95181-6-tzungbi@xxxxxxxxxx
> - https://lore.kernel.org/all/20260427134659.95181-7-tzungbi@xxxxxxxxxx
> - https://lore.kernel.org/all/20260427134659.95181-8-tzungbi@xxxxxxxxxx
Yes
> Could you provide a bit more detail on the rwsem approach? I'm not
> entirely clear on what data or operations the rwsem would be protecting.
Just put a rwsem, or even scru, inside the driver's fops.
You can refactor that out to a misc or revocable later.
Jason