From: Hans de Goede <hdegoede@redhat.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Gergo Koteles" <soyer@irl.hu>
Cc: Ike Panhc <ike.pan@canonical.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands
Date: Thu, 18 Jul 2024 10:12:06 +0200 [thread overview]
Message-ID: <53b247e1-62cf-4289-8ad6-2138a1757e06@redhat.com> (raw)
In-Reply-To: <06e44cdc-b984-23ea-2d89-b4489bce2c27@linux.intel.com>
Hi,
On 7/18/24 10:06 AM, Ilpo Järvinen wrote:
> On Thu, 18 Jul 2024, Gergo Koteles wrote:
>
>> Calling VPC commands consists of several VPCW and VPCR ACPI calls.
>> These calls and their results can get mixed up if they are called
>> simultaneously from different threads, like acpi notify handler,
>> sysfs, debugfs, notification chain.
>>
>> Add a mutex to synchronize VPC commands.
>>
>> Signed-off-by: Gergo Koteles <soyer@irl.hu>
>> ---
>
>> @@ -2027,6 +2053,8 @@ static int ideapad_acpi_add(struct platform_device *pdev)
>> priv->adev = adev;
>> priv->platform_device = pdev;
>>
>> + mutex_init(&priv->vpc_mutex);
>> +
>> ideapad_check_features(priv);
>>
>> err = ideapad_sysfs_init(priv);
>
> mutex_destroy() missing from rollback and ideapad_acpi_remove().
Right, note the easiest way to fix this is to use the new devm_mutex_init()
instead of plain mutex_init() that will also take care of destroying the mutex
on any exit-on-error cases from probe().
Regards,
Hans
next prev parent reply other threads:[~2024-07-18 8:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 7:27 [PATCH v2 0/4] platform/x86: ideapad-laptop: " Gergo Koteles
2024-07-18 7:27 ` [PATCH v2 1/4] platform/x86: ideapad-laptop: introduce a generic notification chain Gergo Koteles
2024-07-18 7:27 ` [PATCH v2 2/4] platform/x86: ideapad-laptop: move ymc_trigger_ec from lenovo-ymc Gergo Koteles
2024-07-18 8:10 ` Ilpo Järvinen
2024-07-18 7:27 ` [PATCH v2 3/4] platform/x86: ideapad-laptop: move ACPI helpers from header to source file Gergo Koteles
2024-07-18 8:12 ` Ilpo Järvinen
2024-07-18 7:27 ` [PATCH v2 4/4] platform/x86: ideapad-laptop: add a mutex to synchronize VPC commands Gergo Koteles
2024-07-18 8:06 ` Ilpo Järvinen
2024-07-18 8:12 ` Hans de Goede [this message]
2024-07-18 8:17 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53b247e1-62cf-4289-8ad6-2138a1757e06@redhat.com \
--to=hdegoede@redhat.com \
--cc=ike.pan@canonical.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=soyer@irl.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®