Commit f252f23a authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski
Browse files

net: Prevent use after free in netif_napi_set_irq_locked()



The cpu_rmap_put() will call kfree() when the last reference is dropped
so it could result in a use after free when we dereference the same
pointer the next line.  Move the cpu_rmap_put() after the dereference.

Fixes: bd7c0060 ("net: move aRFS rmap management and CPU affinity to core")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/5a9c53a4-5487-4b8c-9ffa-d8e5343aaaaf@stanley.mountain


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b9564ca3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment