mbox series

[net,v2,0/3] Action initalization fixes

Message ID 20210407153604.1680079-1-vladbu@nvidia.com
Headers show
Series Action initalization fixes | expand

Message

Vlad Buslov April 7, 2021, 3:36 p.m. UTC
This series fixes reference counting of action instances and modules in
several parts of action init code. The first patch reverts previous fix
that didn't properly account for rollback from a failure in the middle of
the loop in tcf_action_init() which is properly fixed by the following
patch.

Vlad Buslov (3):
  Revert "net: sched: bump refcount for new action in ACT replace mode"
  net: sched: fix action overwrite reference counting
  net: sched: fix err handler in tcf_action_init()

 include/net/act_api.h | 12 ++++------
 net/sched/act_api.c   | 51 ++++++++++++++++++++++++++-----------------
 net/sched/cls_api.c   | 14 ++++++------
 3 files changed, 42 insertions(+), 35 deletions(-)

Comments

Cong Wang April 8, 2021, 10:02 p.m. UTC | #1
On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov <vladbu@nvidia.com> wrote:
>

> This series fixes reference counting of action instances and modules in

> several parts of action init code. The first patch reverts previous fix

> that didn't properly account for rollback from a failure in the middle of

> the loop in tcf_action_init() which is properly fixed by the following

> patch.


I still hate the init_res[] array, but I have no easy and better way to fix
it either, so:

Acked-by: Cong Wang <cong.wang@bytedance.com>


For the long term, we probably want to split the action ->init() into
two: ->init() and ->change(), like TC filters, which hopefully could
ease the complexity of tcf_action_init_1().

Thanks.