Re: [PATCH v1 02/10] platform/x86: msi-wmi-platform: Add unlocked msi_wmi_platform_query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 May 2025 at 21:21, Kurt Borja <kuurtb@xxxxxxxxx> wrote:
>
> On Sun May 11, 2025 at 5:44 PM -03, Antheas Kapenekakis wrote:
> > This driver requires to be able to handle transactions that perform
> > multiple WMI actions at a time. Therefore, it needs to be able to
> > lock the wmi_lock mutex for multiple operations.
> >
> > Add msi_wmi_platform_query_unlocked() to allow the caller to
> > perform the WMI query without locking the wmi_lock mutex, by
> > renaming the existing function and adding a new one that only
> > locks the mutex.
> >
> > Signed-off-by: Antheas Kapenekakis <lkml@xxxxxxxxxxx>
>
> You only use msi_wmi_platform_query_unlocked() to protect the
> fan_curve/AP state right?
>
> If that's the case I think we don't need it. AFAIK sysfs reads/writes
> are already synchronized/locked, and as I mentioned in Patch 10, I don't
> think you need this variant in probe/remove either.
>
> I'd like to hear more opinions on this though.

Are sysfs reads/writes between different files of the same driver
synced? If not, it is better to lock.

I want a second opinion here too.

You are correct on probe/remove.

Antheas

> --
>  ~ Kurt




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux