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] [day] [month] [year] [list]
Date: Mon, 27 May 2024 12:45:22 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Armin Wolf <W_Armin@....de>
Cc: rafael@...nel.org, lenb@...nel.org, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ACPI: EC: Avoid returning AE_OK upon unknown error

On Wed, May 22, 2024 at 11:37 PM Armin Wolf <W_Armin@....de> wrote:
>
> If an error code other than EINVAL, ENODEV or ETIME is returned
> by acpi_ec_read()/acpi_ec_write(), then AE_OK is wrongly returned.
>
> Fix this by only returning AE_OK if the return code is 0, and
> return AE_ERROR otherwise.
>
> Signed-off-by: Armin Wolf <W_Armin@....de>
> ---
>  drivers/acpi/ec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index a68dce2147a4..68dd17f96f63 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -1351,8 +1351,10 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
>                 return AE_NOT_FOUND;
>         case -ETIME:
>                 return AE_TIME;
> -       default:
> +       case 0:
>                 return AE_OK;
> +       default:
> +               return AE_ERROR;
>         }
>  }
>
> --

Applied (with some edits in the subject and changelog) along with the
[1/2] as 6.10-rc material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ