Re: [PATCH net v2] net/sched: act_ife: return -EAGAIN after dropping rtnl_lock in load_metaops_and_vet()

From: fadouse

Date: Mon Nov 23 2026 - 08:04:54 EST


Hi,

Thanks for the review. The u32_change() new-key unwind path on an
unpinned non-root hash table is valid: returning -EAGAIN still reaches
erridr: idr_remove(&ht->handle_idr, handle). As noted, that is a
separate pre-existing cls_u32 issue also reachable via existing
RTNL-dropping autoload paths such as tc_action_load_ops() (both on
-EAGAIN and on -ENOENT), and changing act_ife alone cannot fix
cls_u32's error unwind.

Returning -EAGAIN from load_metaops_and_vet() matches the other
RTNL-dropping TC autoloaders checked (tc_action_load_ops(),
tcf_em_validate(), and em_text_change()) so callers unwind instead of
continuing on the success path with stale filter pointers. The
cls_basic replacement UAF was reproduced and verified fixed at runtime;
by code inspection, cls_flow, cls_fw, cls_route, and cls_u32's
filter-replacement branch (the `if (n)` path, which destroys `new` on
error without touching `n`) also avoid their success-path use of the
old filter pointer.

Since I am respinning v3 to drop the comment per Stephen Hemminger's
feedback, I will also narrow and clarify the cls_u32 scope in the v3
commit message accordingly.

pw-bot: cr

Attachment: signature.asc
Description: OpenPGP digital signature