Re: [PATCH v2] misc/pvpanic: share the shutdown handler across devices
From: Zhu GuangLei
Date: Wed Nov 25 2026 - 06:56:15 EST
On Wed, Nov 25, 2026 at 11:06:22AM +0100, Greg Kroah-Hartman wrote:
> > + guard(mutex)(&pvpanic_sys_off_lock);
> > +
> > return sysfs_emit(buf, "%x\n", pi->events);
> > }
>
> Why do you need a lock to read a single value that could change right
> after it is read?
You don't, the lock adds nothing there. I'll drop it in v3 and leave
events_show() as it is today.
thanks,
Zhu GuangLei