netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/5] net: sched: Undo tcf_bind_filter in case of errors in set callbacks
@ 2023-07-04 15:14 Victor Nogueira
  2023-07-04 15:14 ` [PATCH net 1/5] net: sched: cls_bpf: Undo tcf_bind_filter in case of an error Victor Nogueira
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Victor Nogueira @ 2023-07-04 15:14 UTC (permalink / raw)
  To: netdev
  Cc: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni,
	pctammela, kernel

Five different classifier (fw, bpf, u32, matchall, and flower) are
calling tcf_bind_filter in their callbacks, but weren't undoing it by
calling tcf_unbind_filter if their was an error after binding.

This patch set fixes all this by calling tcf_unbind_filter in such
cases.

This set also undoes a refcount decrement in cls_u32 when an update
fails under specific conditions which are described in patch #4.

Victor Nogueira (5):
  net: sched: cls_bpf: Undo tcf_bind_filter in case of an error
  net: sched: cls_matchall: Undo tcf_bind_filter in case of failure
    after mall_set_parms
  net: sched: cls_u32: Undo tcf_bind_filter if u32_replace_hw_knode
  net: sched: cls_u32: Undo refcount decrement in case update failed
  net: sched: cls_flower: Undo tcf_bind_filter if fl_set_key fails

 net/sched/cls_bpf.c      |  8 ++++++--
 net/sched/cls_flower.c   | 29 +++++++++++++++++++++++++----
 net/sched/cls_matchall.c |  8 ++++++--
 net/sched/cls_u32.c      | 32 ++++++++++++++++++++++++++------
 4 files changed, 63 insertions(+), 14 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-07-05  7:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 15:14 [PATCH net 0/5] net: sched: Undo tcf_bind_filter in case of errors in set callbacks Victor Nogueira
2023-07-04 15:14 ` [PATCH net 1/5] net: sched: cls_bpf: Undo tcf_bind_filter in case of an error Victor Nogueira
2023-07-04 20:48   ` Simon Horman
2023-07-04 20:55     ` Jamal Hadi Salim
2023-07-04 21:19       ` Simon Horman
2023-07-04 21:42         ` Jamal Hadi Salim
2023-07-05  7:45           ` Simon Horman
2023-07-04 15:14 ` [PATCH net 2/5] net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms Victor Nogueira
2023-07-04 15:14 ` [PATCH net 3/5] net: sched: cls_u32: Undo tcf_bind_filter if u32_replace_hw_knode Victor Nogueira
2023-07-04 15:14 ` [PATCH net 4/5] net: sched: cls_u32: Undo refcount decrement in case update failed Victor Nogueira
2023-07-04 15:14 ` [PATCH net 5/5] net: sched: cls_flower: Undo tcf_bind_filter if fl_set_key fails Victor Nogueira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).