[PATCH] fix adm9240 oops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux