From: Greg Kroah-Hartman Date: Wed, 1 Aug 2012 22:39:02 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.5.1~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94c6e208ecd82176b388f3204788cab328177156;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: acpi-ac-prevent-oops-on-some-boxes-due-to-missing-check-power_supply_register-return-value-check.patch btrfs-call-the-ordered-free-operation-without-any-locks-held.patch --- diff --git a/queue-3.0/acpi-ac-prevent-oops-on-some-boxes-due-to-missing-check-power_supply_register-return-value-check.patch b/queue-3.0/acpi-ac-prevent-oops-on-some-boxes-due-to-missing-check-power_supply_register-return-value-check.patch new file mode 100644 index 00000000000..573644fed82 --- /dev/null +++ b/queue-3.0/acpi-ac-prevent-oops-on-some-boxes-due-to-missing-check-power_supply_register-return-value-check.patch @@ -0,0 +1,42 @@ +From f197ac13f6eeb351b31250b9ab7d0da17434ea36 Mon Sep 17 00:00:00 2001 +From: Lan Tianyu +Date: Fri, 20 Jul 2012 13:29:16 +0800 +Subject: ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check + +From: Lan Tianyu + +commit f197ac13f6eeb351b31250b9ab7d0da17434ea36 upstream. + +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 +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/ac.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/acpi/ac.c ++++ b/drivers/acpi/ac.c +@@ -292,7 +292,9 @@ static int acpi_ac_add(struct acpi_devic + 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)\n", + acpi_device_name(device), acpi_device_bid(device), diff --git a/queue-3.0/btrfs-call-the-ordered-free-operation-without-any-locks-held.patch b/queue-3.0/btrfs-call-the-ordered-free-operation-without-any-locks-held.patch new file mode 100644 index 00000000000..4bf8d870673 --- /dev/null +++ b/queue-3.0/btrfs-call-the-ordered-free-operation-without-any-locks-held.patch @@ -0,0 +1,45 @@ +From e9fbcb42201c862fd6ab45c48ead4f47bb2dea9d Mon Sep 17 00:00:00 2001 +From: Chris Mason +Date: Wed, 25 Jul 2012 15:57:13 -0400 +Subject: Btrfs: call the ordered free operation without any locks held + +From: Chris Mason + +commit e9fbcb42201c862fd6ab45c48ead4f47bb2dea9d upstream. + +Each ordered operation has a free callback, and this was called with the +worker spinlock held. Josef made the free callback also call iput, +which we can't do with the spinlock. + +This drops the spinlock for the free operation and grabs it again before +moving through the rest of the list. We'll circle back around to this +and find a cleaner way that doesn't bounce the lock around so much. + +Signed-off-by: Chris Mason +Signed-off-by: Greg Kroah-Hartman + +--- + fs/btrfs/async-thread.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/fs/btrfs/async-thread.c ++++ b/fs/btrfs/async-thread.c +@@ -212,10 +212,17 @@ static noinline int run_ordered_completi + + work->ordered_func(work); + +- /* now take the lock again and call the freeing code */ ++ /* now take the lock again and drop our item from the list */ + spin_lock(&workers->order_lock); + list_del(&work->order_list); ++ spin_unlock(&workers->order_lock); ++ ++ /* ++ * we don't want to call the ordered free functions ++ * with the lock held though ++ */ + work->ordered_free(work); ++ spin_lock(&workers->order_lock); + } + + spin_unlock(&workers->order_lock); diff --git a/queue-3.0/series b/queue-3.0/series index 4b646a3b458..3a260206393 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -15,3 +15,5 @@ locks-fix-checking-of-fcntl_setlease-argument.patch ftrace-disable-function-tracing-during-suspend-resume-and-hibernation-again.patch stable-update-references-to-older-2.6-versions-for-3.x.patch workqueue-perform-cpu-down-operations-from-low-priority-cpu_notifier.patch +acpi-ac-prevent-oops-on-some-boxes-due-to-missing-check-power_supply_register-return-value-check.patch +btrfs-call-the-ordered-free-operation-without-any-locks-held.patch