Re: [PATCH] platform/x86: thinkpad_acpi: Take mutex in hotkey_resume

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

 



Hi Dennis,

thanks for the fix!

On 2023-09-14 01:18:29+0200, admin@xxxxxxxxxxxxxxx wrote:
> From: Dennis Bonke <admin@xxxxxxxxxxxxxxx>
> 
> hotkey_status_{set,get} expect the hotkey_mutex to be held.
> It seems like it was missed here and that gives warnings while resuming.

Which kind of warnings?

If it's from lockdep then it's triggered by hotkey_mask_set() and the
commit message is a bit off.

Also then the patch needs:

Fixes: 38831eaf7d4c ("platform/x86: thinkpad_acpi: use lockdep annotations")
Cc: stable@xxxxxxxxxxxxxxx

With those:

Reviewed-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>

> 
> Signed-off-by: Dennis Bonke <admin@xxxxxxxxxxxxxxx>
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index d70c89d32534..de5859a5eb0d 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -4116,9 +4116,11 @@ static void hotkey_resume(void)
>  {
>  	tpacpi_disable_brightness_delay();
>  
> +	mutex_lock(&hotkey_mutex)
>  	if (hotkey_status_set(true) < 0 ||
>  	    hotkey_mask_set(hotkey_acpi_mask) < 0)
>  		pr_err("error while attempting to reset the event firmware interface\n");
> +	mutex_unlock(&hotkey_mutex);
>  
>  	tpacpi_send_radiosw_update();
>  	tpacpi_input_send_tabletsw();
> -- 
> 2.40.1
> 



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux