lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 6 Jan 2024 23:04:55 +0100
From: Armin Wolf <W_Armin@....de>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Hans de Goede <hdegoede@...hat.com>,
 Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] platform/x86: wmi: Fix wmi_dev_probe()

Am 05.01.24 um 14:47 schrieb Dan Carpenter:

> This has a reversed if statement so it accidentally disables the wmi
> method before returning.

Good catch, you are absolutely right!
And on top of that it also breaks WMI event drivers since the WMI_PROBED
flag will not be set when the driver successfully probes and instead will
be set when the driver fails to probe.

For the patch:
Reviewed-by: Armin Wolf <W_Armin@....de>

Thanks,
Armin Wolf

>
> Fixes: 704af3a40747 ("platform/x86: wmi: Remove chardev interface")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>   drivers/platform/x86/wmi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 157f1ce8ac0a..e6f6fa2fd080 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -868,7 +868,7 @@ static int wmi_dev_probe(struct device *dev)
>   	if (wdriver->probe) {
>   		ret = wdriver->probe(dev_to_wdev(dev),
>   				find_guid_context(wblock, wdriver));
> -		if (!ret) {
> +		if (ret) {
>   			if (ACPI_FAILURE(wmi_method_enable(wblock, false)))
>   				dev_warn(dev, "Failed to disable device\n");
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ