Konstantin Khlebnikov 311bd84247 EDAC: Fix kernel panic on module unloading
This patch fixes use-after-free and double-free bugs in
edac_mc_sysfs_exit(). mci_pdev has single reference and put_device()
calls mc_attr_release() which calls kfree(). The following
device_del() works with already released memory. An another kfree() in
edac_mc_sysfs_exit() releses the same memory again. Great.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: stable@vger.kernel.org # 3.[67]
Cc: Denis Kirjanov <kirjanov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Link: http://lkml.kernel.org/r/20121214110310.11019.21098.stgit@zurg
Signed-off-by: Borislav Petkov <bp@alien8.de>
2013-01-07 17:42:58 +01:00
..
2012-11-28 11:46:19 +01:00
2011-04-19 00:23:22 +02:00
2011-04-19 00:23:22 +02:00
2012-07-29 21:11:05 -03:00
2012-07-29 21:11:05 -03:00
2012-10-30 10:05:51 +01:00
2012-09-25 07:32:33 -03:00
2012-12-12 16:48:49 +01:00
2012-11-28 11:56:30 +01:00
2012-11-28 11:56:30 +01:00
2011-04-19 00:23:22 +02:00
2011-04-19 00:23:22 +02:00
2009-04-02 19:05:03 -07:00