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 May 2013 09:07:23 +0800 From: Zhang Rui <rui.zhang@...el.com> To: Michel Lespinasse <walken@...gle.com> Cc: linux-acpi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>, "Rafael J. Wysocki" <rjw@...k.pl> Subject: Re: ACPI fan driver: uninitialized variable when CONFIG_PM is not set Hi, Michel, On Mon, 2013-04-29 at 05:32 -0700, Michel Lespinasse wrote: > In the following code: > > static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long > *state) > { > struct acpi_device *device = cdev->devdata; > int result; > int acpi_state; > > if (!device) > return -EINVAL; > > result = acpi_bus_update_power(device->handle, &acpi_state); > if (result) > return result; > > *state = (acpi_state == ACPI_STATE_D3 ? 0 : > (acpi_state == ACPI_STATE_D0 ? 1 : -1)); > return 0; > } > > With CONFIG_PM not set, acpi_bus_update_power() returns 0 and does not > initialize acpi_state. This results in acpi_state being used before > initialization. > > (I found out by random chance, as I suppose people don't normally > build without CONFIG_PM anymore ?) > > I'm not sure what a proper fix would be, so I'll just report this here > and enable CONFIG_PM locally :) > thanks for your report. please check if the following patch helps or not. https://patchwork.kernel.org/patch/2574691/ thanks, rui -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists