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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 10 Jun 2021 15:28:45 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Colin King <colin.king@...onical.com>
Cc:     "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        Maximilian Luz <luzmaximilian@...il.com>,
        Daniel Scally <djrscally@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] ACPI: scan: ensure ret is initialized to avoid
 garbage being returned

On Wed, Jun 9, 2021 at 7:33 PM Colin King <colin.king@...onical.com> wrote:
>
> From: Colin Ian King <colin.king@...onical.com>
>
> In the unlikely event that there are no callback calls made then ret
> will be returned as an uninitialized value. Clean up static analysis
> warnings by ensuring ret is initialized.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: a9e10e587304 ("ACPI: scan: Extend acpi_walk_dep_device_list()")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/acpi/scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index c3067e8bfc47..0945d952f0fc 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -2151,7 +2151,7 @@ int acpi_walk_dep_device_list(acpi_handle handle,
>                               void *data)
>  {
>         struct acpi_dep_data *dep, *tmp;
> -       int ret;
> +       int ret = 0;
>
>         mutex_lock(&acpi_dep_list_lock);
>         list_for_each_entry_safe(dep, tmp, &acpi_dep_list, node) {
> --

Applied with some edits in the subject and changelog.

Basically, if you make changes like this, please specify which piece
of code you change in the subject/changelog.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ