Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Cc: [email protected] # 3.[67] Cc: Denis Kirjanov <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Link: http://lkml.kernel.org/r/20121214110310.11019.21098.stgit@zurg Signed-off-by: Borislav Petkov <[email protected]>
- Loading branch information