public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] eeepc-laptop: Fix user after free
@ 2008-08-04 17:08 Matthew Garrett
  2008-08-04 17:15 ` [PATCH 2/2] eeepc-laptop: Use standard interfaces Matthew Garrett
  2008-08-06  9:23 ` [PATCH v2 1/2] eeepc-laptop: Fix user after free Matthew Garrett
  0 siblings, 2 replies; 18+ messages in thread
From: Matthew Garrett @ 2008-08-04 17:08 UTC (permalink / raw)
  To: corentincj; +Cc: linux-kernel, linux-acpi

eeepc-laptop uses the hwmon struct after unregistering the device, 
causing an oops on module unload. Flip the ordering to fix.

Signed-off-by: Matthew Garrett <mjg@redhat.com>

---

diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c
index 9e8d79e..facdb98 100644
--- a/drivers/misc/eeepc-laptop.c
+++ b/drivers/misc/eeepc-laptop.c
@@ -553,9 +553,9 @@ static void eeepc_hwmon_exit(void)
 	hwmon = eeepc_hwmon_device;
 	if (!hwmon)
 		return ;
-	hwmon_device_unregister(hwmon);
 	sysfs_remove_group(&hwmon->kobj,
 			   &hwmon_attribute_group);
+	hwmon_device_unregister(hwmon);
 	eeepc_hwmon_device = NULL;
 }

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-10-08 20:52 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-04 17:08 [PATCH 1/2] eeepc-laptop: Fix user after free Matthew Garrett
2008-08-04 17:15 ` [PATCH 2/2] eeepc-laptop: Use standard interfaces Matthew Garrett
2008-08-04 17:53   ` Ivo van Doorn
2008-08-04 17:36     ` Matthew Garrett
2008-08-04 21:21       ` Henrique de Moraes Holschuh
2008-08-04 21:29   ` Henrique de Moraes Holschuh
2008-08-06  9:23 ` [PATCH v2 1/2] eeepc-laptop: Fix user after free Matthew Garrett
2008-08-06  9:25   ` [PATCH v2 2/2] eeepc-laptop: Use standard interfaces Matthew Garrett
2008-08-19  9:58     ` Andrew Morton
2008-08-19 11:13       ` Matthew Garrett
2008-08-19 23:09         ` Henrique de Moraes Holschuh
2008-08-19 23:24           ` Matthew Garrett
2008-08-20  1:18             ` Henrique de Moraes Holschuh
2008-08-20  1:28               ` Matthew Garrett
2008-08-20  1:32                 ` Henrique de Moraes Holschuh
2008-08-20  1:42                   ` Awkward rfkill corner cases Matthew Garrett
2008-08-20  2:30                     ` Henrique de Moraes Holschuh
2008-10-08 20:50         ` [PATCH v2 2/2] eeepc-laptop: Use standard interfaces Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox