lkml.org 
[lkml]   [2005]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] fix adm9240 oops
From
Date
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-25 22:58    [W:0.066 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site