Ben Hutchings 53c1353ad7 lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
[ Upstream commit 7c5d4801ecf0564c860033d89726b99723c55146 ]

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: 4e0473f1060a ("lib: cpu_rmap: Avoid use after free on rmap->obj array entries")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/ZHo0vwquhOy3FaXc@decadent.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-14 10:35:25 +02:00
..
2017-08-15 09:02:08 -07:00
2015-11-23 09:44:58 +01:00
2017-06-09 11:52:07 +02:00
2019-04-20 09:15:07 +02:00
2017-02-24 17:46:57 -08:00
2022-07-12 16:27:29 +02:00
2018-02-16 20:23:04 +01:00
2018-12-08 13:03:35 +01:00
2016-12-06 10:17:03 +02:00
2020-11-05 11:06:58 +01:00
2017-08-15 09:02:07 -07:00