Skip to content
Commit 7c5d4801 authored by Ben Hutchings's avatar Ben Hutchings Committed by Jakub Kicinski
Browse files

lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()

irq_cpu_rmap_release() calls cpu_rmap_put(), which may free the rmap.
So we need to clear the pointer to our glue structure in rmap before
doing that, not after.

Fixes: 4e0473f1

 ("lib: cpu_rmap: Avoid use after free on rmap->obj array entries")
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/ZHo0vwquhOy3FaXc@decadent.org.uk
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 44f8baaf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment