public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix adm9240 oops
@ 2005-08-25 20:56 Jonathan Corbet
  2005-08-25 21:49 ` [PATCH] drivers/hwmon/*: kfree() correct pointers Alexey Dobriyan
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Corbet @ 2005-08-25 20:56 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, linux-kernel

The adm9240 driver, in adm9240_detect(), allocates a structure.  The
error path attempts to kfree() a subfield of that structure, resulting
in an oops (or slab corruption) if the hardware is not present.  This
one seems worth fixing for 2.6.13.

jon

Signed-off-by: Jonathan Corbet <corbet@lwn.net>

--- 2.6.13-rc7/drivers/hwmon/adm9240.c.orig	2005-08-25 14:30:04.000000000 -0600
+++ 2.6.13-rc7/drivers/hwmon/adm9240.c	2005-08-25 14:30:26.000000000 -0600
@@ -616,7 +616,7 @@ static int adm9240_detect(struct i2c_ada
 
 	return 0;
 exit_free:
-	kfree(new_client);
+	kfree(data);
 exit:
 	return err;
 }

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

end of thread, other threads:[~2005-08-26  7:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-25 20:56 [PATCH] fix adm9240 oops Jonathan Corbet
2005-08-25 21:49 ` [PATCH] drivers/hwmon/*: kfree() correct pointers Alexey Dobriyan
2005-08-25 22:02   ` Jean Delvare
2005-08-25 23:53     ` Jonathan Corbet
2005-08-26  7:32       ` Jean Delvare

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