projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c7281c
)
eeepc-laptop: fix use after free
author
Matthew Garrett
<
[email protected]
>
Wed, 20 Aug 2008 21:08:57 +0000
(14:08 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 20 Aug 2008 22:40:30 +0000
(15:40 -0700)
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 <
[email protected]
>
Cc: Henrique de Moraes Holschuh <
[email protected]
>
Cc: Corentin Chary <
[email protected]
>
Cc: Karol Kozimor <
[email protected]
>
Cc: <
[email protected]
> [2.6.26.x]
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/misc/eeepc-laptop.c
patch
|
blob
|
history
diff --git
a/drivers/misc/eeepc-laptop.c
b/drivers/misc/eeepc-laptop.c
index 9e8d79e7e9f4cb4b105840ce71420e435820edd5..facdb9893c84c322dbb65f47e2a7bf8de3c69685 100644
(file)
--- 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;
}