[kernel/f15] Add patch to fix oops when removing wmi module (rhbz 706574)
Josh Boyer
jwboyer at fedoraproject.org
Wed Nov 2 13:59:42 UTC 2011
commit 6bb8ae898aae45c0a1c24d0a3c9087082abd3b8f
Author: Josh Boyer <jwboyer at redhat.com>
Date: Wed Nov 2 09:55:36 2011 -0400
Add patch to fix oops when removing wmi module (rhbz 706574)
...properly-cleanup-devices-to-avoid-crashes.patch | 41 ++++++++++++++++++++
kernel.spec | 11 +++++-
2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/WMI-properly-cleanup-devices-to-avoid-crashes.patch b/WMI-properly-cleanup-devices-to-avoid-crashes.patch
new file mode 100644
index 0000000..1119d25
--- /dev/null
+++ b/WMI-properly-cleanup-devices-to-avoid-crashes.patch
@@ -0,0 +1,41 @@
+From 023b9565972a4a5e0f01b9aa32680af6e9b5c388 Mon Sep 17 00:00:00 2001
+From: Dmitry Torokhov <dmitry.torokhov at gmail.com>
+Date: Wed, 7 Sep 2011 15:00:02 -0700
+Subject: [PATCH] WMI: properly cleanup devices to avoid crashes
+
+We need to remove devices that we destroy from the list, otherwise
+we'll crash if there are more than one "_WDG" methods in DSDT.
+
+This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052
+
+Tested-by: Ilya Tumaykin <librarian_rus at yahoo.com>
+Cc: stable at kernel.org
+Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
+Acked-by: Carlos Corbacho <carlos at strangeworlds.co.uk>
+Signed-off-by: Matthew Garrett <mjg at redhat.com>
+---
+ drivers/platform/x86/wmi.c | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
+index f23d5a8..9b88be4 100644
+--- a/drivers/platform/x86/wmi.c
++++ b/drivers/platform/x86/wmi.c
+@@ -754,9 +754,13 @@ static void wmi_free_devices(void)
+ struct wmi_block *wblock, *next;
+
+ /* Delete devices for all the GUIDs */
+- list_for_each_entry_safe(wblock, next, &wmi_block_list, list)
++ list_for_each_entry_safe(wblock, next, &wmi_block_list, list) {
++ list_del(&wblock->list);
+ if (wblock->dev.class)
+ device_unregister(&wblock->dev);
++ else
++ kfree(wblock);
++ }
+ }
+
+ static bool guid_already_parsed(const char *guid_string)
+--
+1.7.6.4
+
diff --git a/kernel.spec b/kernel.spec
index 6bdada8..87fc89a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -42,7 +42,7 @@ Summary: The Linux kernel
# When changing real_sublevel below, reset this by hand to 1
# (or to 0 and then use rpmdev-bumpspec).
#
-%global baserelease 4
+%global baserelease 5
%global fedora_build %{baserelease}
# real_sublevel is the 3.x kernel version we're starting with
@@ -719,6 +719,9 @@ Patch21050: xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
Patch21070: oom-fix-integer-overflow-of-points.patch
+#rhbz 706574
+Patch21071: WMI-properly-cleanup-devices-to-avoid-crashes.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1304,6 +1307,9 @@ ApplyPatch benet-remove-bogus-unlikely-on-vlan-check.patch
#rhbz 750402
ApplyPatch oom-fix-integer-overflow-of-points.patch
+#rhbz 706574
+ApplyPatch WMI-properly-cleanup-devices-to-avoid-crashes.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -1924,6 +1930,9 @@ fi
# and build.
%changelog
+* Wed Nov 02 2011 Josh Boyer <jwboyer at redhat.com>
+- Add patch to fix oops when removing wmi module (rhbz 706574)
+
* Tue Nov 01 2011 Dave Jones <davej at redhat.com> 2.6.40.8-5
- allow building the perf rpm for ARM (rhbz 741325)
More information about the scm-commits
mailing list