Re: [PATCH] Fix segfault when printing battery status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Rolf Eike Beer wrote:
cat /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:19/PNP0C0A:00/power_supply/BAT1/status

This leads to a stacktrace as acpi_battery_get_property() returns 0 for a case where it does not set val->intval. These value is used as an array index in drivers/power/power_supply_sysfs.c::power_supply_show_property(). I had a situation where the value was 4096 which caused a problem as the array only has 5 entries.

Signed-off-by: Rolf Eike Beer <eike-kernel@xxxxxxxxx>
Rolf, thanks for remainding.
Acked again,
Alex.
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux