summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@amd.com>2026-11-18 19:50:27 +0530
committerBorislav Petkov (AMD) <bp@alien8.de>2026-11-23 19:09:57 -0800
commita95cfe28d0d96b68826498aab90e494b9f6bd22c (patch)
tree6286251e5236f3276314628a464cbefbb00bc025 /scripts/objdiff
parent348730838f0f742ad496d1165eb011b7ecaab031 (diff)
EDAC/versalnet: Fix use-after-free in remove_one_mc()
device_unregister() drops the last reference on the device and invokes versal_edac_release() which calls kfree(dev). The subsequent call to edac_mc_del_mc(mci->pdev) then dereferences the freed pointer. Save the device pointer, call edac_mc_del_mc() and edac_mc_free() first, then device_unregister() last so the device is freed only after all users are done with it. [ bp: Massage commit message. ] Fixes: d5fe2fec6c40 ("EDAC: Add a driver for the AMD Versal NET DDR controller") Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Cc: <stable@kernel.org> Link: https://patch.msgid.link/20261118142213.100581-4-shubhrajyoti.datta@amd.com
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions