diff options
author | Cong Wang <[email protected]> | 2020-09-22 20:56:23 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2020-09-24 19:46:21 -0700 |
commit | e49d8c22f1261c43a986a7fdbf677ac309682a07 (patch) | |
tree | 83b54bf6cd0eb7356401571e0ff6533fd2bfffda /tools/lib/api/debug.c | |
parent | 7241c5a697479c7d0c5a96595822cdab750d41ae (diff) |
net_sched: defer tcf_idr_insert() in tcf_action_init_1()
All TC actions call tcf_idr_insert() for new action at the end
of their ->init(), so we can actually move it to a central place
in tcf_action_init_1().
And once the action is inserted into the global IDR, other parallel
process could free it immediately as its refcnt is still 1, so we can
not fail after this, we need to move it after the goto action
validation to avoid handling the failure case after insertion.
This is found during code review, is not directly triggered by syzbot.
And this prepares for the next patch.
Cc: Vlad Buslov <[email protected]>
Cc: Jamal Hadi Salim <[email protected]>
Cc: Jiri Pirko <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/lib/api/debug.c')
0 files changed, 0 insertions, 0 deletions