diff options
| author | 2026-10-19 23:02:27 +0800 | |
|---|---|---|
| committer | 2026-10-20 15:05:41 +0300 | |
| commit | 9a4102e4185ad37d41b00d263ac05c370f5c9baf (patch) | |
| tree | 2a29b70e3f65a47876e7dc30b57915c54c72b96d /scripts/Makefile.thinlto | |
| parent | platform/x86: lenovo-wmi-capdata: Store a pointer to component info (diff) | |
platform/x86: lenovo-wmi-capdata: Defer mutex initialization
In the following changes, priv->list may be freed if the first call to
lwmi_cd_cache() fails due to WMI/ACPI errors, so the list_mutex must be
initialized after it in order not to break lockdep, as there is no
devm_mutex_destroy(). Considering that the first call to lwmi_cd_cache()
doesn't need serialization as there is no other reader or writer this
early, the initialization of list_mutex can be deferred.
Therefore, initialize list_mutex only after the first call to
lwmi_cd_cache() succeeds, otherwise it remains uninitialized and can be
devm_kfree()-ed.
Tested-by: Navon John Lukose <navonjohnlukose@gmail.com>
Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20261019-lwmi-wmi-new-api-v5-5-71557d28d058@rong.moe
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
