From: Matthew Garrett <mjg59@srcf.ucam.org>
To: corentincj@iksaif.net
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: [PATCH v2 1/2] eeepc-laptop: Fix user after free
Date: Wed, 6 Aug 2008 10:23:52 +0100 [thread overview]
Message-ID: <20080806092352.GA17801@srcf.ucam.org> (raw)
In-Reply-To: <20080804170833.GA9513@srcf.ucam.org>
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>
---
commit 95f4bc41ef256b8e3dfa94cabe1faf0776ac988c
Author: Matthew Garrett <mjg59@srcf.ucam.org>
Date: Mon Aug 4 17:57:40 2008 +0100
Fix use after free
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
next prev parent reply other threads:[~2008-08-06 9:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Matthew Garrett [this message]
2008-08-06 9:25 ` [PATCH v2 " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080806092352.GA17801@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=corentincj@iksaif.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox