From: Simon Horman <simon.horman@corigine.com>
To: Victor Nogueira <victor@mojatatu.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
pctammela@mojatatu.com, kernel@mojatatu.com
Subject: Re: [PATCH net-next v4 3/5] net: sched: cls_u32: Undo refcount decrement in case update failed
Date: Thu, 13 Jul 2023 10:17:42 +0100 [thread overview]
Message-ID: <ZK/BNvy+BFS/KnrS@corigine.com> (raw)
In-Reply-To: <20230712211313.545268-4-victor@mojatatu.com>
On Wed, Jul 12, 2023 at 06:13:11PM -0300, Victor Nogueira wrote:
> In the case of an update, when TCA_U32_LINK is set, u32_set_parms will
> decrement the refcount of the ht_down (struct tc_u_hnode) pointer
> present in the older u32 filter which we are replacing. However, if
> u32_replace_hw_knode errors out, the update command fails and that
> ht_down pointer continues decremented. To fix that, when
> u32_replace_hw_knode fails, check if ht_down's refcount was decremented
> and undo the decrement.
>
> Fixes: d34e3e181395 ("net: cls_u32: Add support for skip-sw flag to tc u32 classifier.")
> Signed-off-by: Victor Nogueira <victor@mojatatu.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
> Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-07-13 9:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 21:13 [PATCH net-next v4 0/5] net: sched: Fixes for classifiers Victor Nogueira
2023-07-12 21:13 ` [PATCH net-next v4 1/5] net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms Victor Nogueira
2023-07-13 9:17 ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 2/5] net: sched: cls_u32: Undo tcf_bind_filter if u32_replace_hw_knode fails Victor Nogueira
2023-07-13 9:17 ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 3/5] net: sched: cls_u32: Undo refcount decrement in case update failed Victor Nogueira
2023-07-13 9:17 ` Simon Horman [this message]
2023-07-12 21:13 ` [PATCH net-next v4 4/5] net: sched: cls_bpf: Undo tcf_bind_filter in case of an error Victor Nogueira
2023-07-13 9:18 ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 5/5] net: sched: cls_flower: " Victor Nogueira
2023-07-13 9:18 ` Simon Horman
2023-07-13 17:25 ` [PATCH net-next v4 0/5] net: sched: Fixes for classifiers Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZK/BNvy+BFS/KnrS@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@mojatatu.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pctammela@mojatatu.com \
--cc=victor@mojatatu.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.