In the Linux kernel, the following vulnerability has been resolved:
EDAC/igen6: Avoid segmentation fault on module unload
The segmentation fault happens because:
During modprobe: 1. In igen6probe(), igen6pvt will be allocated with kzalloc() 2. In igen6registermci(), mci->pvtinfo will point to &igen6pvt->imc[mc]
During rmmod: 1. In mcirelease() in edacmc.c, it will kfree(mci->pvtinfo) 2. In igen6remove(), it will kfree(igen6_pvt);
Fix this issue by setting mci->pvt_info to NULL to avoid the double kfree.