Re: [PATCH net] net/sched: act_api: use mutex in tcf_idr_check_alloc

From: Victor Nogueira

Date: Thu May 28 2026 - 08:27:25 EST


On 26/05/2026 19:08, Kyle Zeng wrote:
Currently, the NEWTFILTER path uses RCU to guard action idr accesses while
the DELTFILTER path uses mutex to guard action accesses. This
inconsistency leads to a race condition scenario, which can lead to
erroneous operations on refcount, eventually leading to use-after-free
situation.
In this patch, we revert the introduction of RCU back to mutex in the
NEWFILTER path, which is consistent with the DELFILTER path, avoiding
the race condition.

Fixes: 4b55e86736d5 ("net/sched: act_api: rely on rcu in tcf_idr_check_alloc")
Signed-off-by: Kyle Zeng <kylebot@xxxxxxxxxx>

Reviewed-by: Victor Nogueira <victor@xxxxxxxxxxxx>