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
| ||
|
Date: Thu, 16 Sep 2021 06:23:58 -0700 From: Guenter Roeck <linux@...ck-us.net> To: Andy Shevchenko <andy.shevchenko@...il.com>, Denis Pauk <pauk.denis@...il.com> Cc: Bernhard Seibold <mail@...nhard-seibold.de>, Pär Ekholm <pehlm@...holm.org>, to.eivind@...il.com, "Artem S . Tashkinov" <aros@....com>, Vittorio Roberto Alfieri <me@...toor.com>, Sahan Fernando <sahan.h.fernando@...il.com>, Andy Shevchenko <andriy.shevchenko@...el.com>, Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v6 3/3] hwmon: (nct6775) Support access via Asus WMI. On 9/16/21 1:34 AM, Andy Shevchenko wrote: [ ... ] >> + u32 args = bank | (reg << 8) | (val << 16); >> + struct acpi_buffer input = { (acpi_size) sizeof(args), &args }; >> + struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; >> + acpi_status status; >> + union acpi_object *obj; >> + u32 tmp = 0; > Ah, you changed the above to add the initialization. Without knowing that, your comment below is a bit misleading. Guenter >> + obj = output.pointer; >> + if (obj && obj->type == ACPI_TYPE_INTEGER) >> + tmp = obj->integer.value; >> + >> + if (retval) >> + *retval = tmp; >> + >> + kfree(obj); > >> + if (tmp == ASUSWMI_UNSUPPORTED_METHOD) > > This is uninitialized tmp in case when no obj, or obj is of the wrong type. > >> + return -ENODEV; >> + return 0; >> +#else >> + return -EOPNOTSUPP; >> +#endif >> +} >
Powered by blists - more mailing lists