Re: [PATCH v10 8/9] platform/chrome: Protect cros_ec_device lifecycle with revocable
From: Tzung-Bi Shih
Date: Sat May 16 2026 - 10:35:12 EST
On Fri, May 15, 2026 at 08:28:29AM +0000, Tzung-Bi Shih wrote:
> On Thu, May 14, 2026 at 01:02:14PM -0300, Jason Gunthorpe wrote:
> > 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.
>
> I see. Thank you for your suggestion. I will explore it and send out a
> new version.
https://lore.kernel.org/all/20260516143017.18560-1-tzungbi@xxxxxxxxxx
is an attempt at it.