Bug#661995: Inspiron 1090: Panic on power event (Doubled AC adapter)
tags 661995 + upstream patch moreinfo
quit Hi, Giovanni Biscuolo wrote: > "sysfs: cannot create duplicate filename '/class/power_supply/ACAD'" Please test the attached patch against a 3.2.y kernel, for example using the instructions below: 0. prerequisites: apt-get install git build-essential 1. get the kernel history, if you don't already have it: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2. fetch point releases: cd linux git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git git fetch stable 3. configure, build, test: git checkout stable/linux-3.2.y cp /boot/config-$(uname -r) .config; # current configuration scripts/config --disable DEBUG_INFO make localmodconfig; # optional: minimize configuration make deb-pkg; # optionally with -j<num> for parallel build dpkg -i ../<name of package>; # as root reboot ... test test test ... Hopefully it reproduces the bug. So 4. try the patch: cd linux git am -3sc /path/to/the/patch make deb-pkg; # maybe with -j4 dpkg -i ../<name of package>; # as root reboot ... test test test ... Hope that helps, Jonathan From: Lan Tianyu <tianyu.lan@intel.com> Date: Tue, 24 Jul 2012 23:41:45 -0400 Subject: ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check In the ac.c, power_supply_register()'s return value is not checked. As a result, the driver's add() ops may return success even though the device failed to initialize. For example, some BIOS may describe two ACADs in the same DSDT. The second ACAD device will fail to register, but ACPI driver's add() ops returns sucessfully. The ACPI device will receive ACPI notification and cause OOPS. https://bugzilla.redhat.com/show_bug.cgi?id=772730 Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- drivers/acpi/ac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 6512b20aeccd..d1fcbc0f6cbc 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -292,7 +292,9 @@ static int acpi_ac_add(struct acpi_device *device) ac->charger.properties = ac_props; ac->charger.num_properties = ARRAY_SIZE(ac_props); ac->charger.get_property = get_ac_property; - power_supply_register(&ac->device->dev, &ac->charger); + result = power_supply_register(&ac->device->dev, &ac->charger); + if (result) + goto end; printk(KERN_INFO PREFIX "%s [%s] (%s) ", acpi_device_name(device), acpi_device_bid(device), -- 1.7.10.4 |
Bug#661995: Inspiron 1090: Panic on power event (Doubled AC adapter)
tags 661995 + fixed-upstream pending
fixed 661995 linux/3.5.2-1~experimental.1 quit Jonathan Nieder wrote: > Giovanni Biscuolo wrote: >> "sysfs: cannot create duplicate filename '/class/power_supply/ACAD'" > > Please test the attached patch against a 3.2.y kernel, for example > using the instructions below: Applied upstream as v3.2.25~8 and v3.5.1~56 (ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check, 2012-07-20). Let's assume it works. :) Thanks again, Jonathan -- To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: http://lists.debian.org/20120903013304.GA2672@mannheim-rule.local |
| All times are GMT. The time now is 07:03 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.