[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZK/BNvy+BFS/KnrS@corigine.com>
Date: Thu, 13 Jul 2023 10:17:42 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Victor Nogueira <victor@...atatu.com>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, pctammela@...atatu.com,
kernel@...atatu.com
Subject: Re: [PATCH net-next v4 3/5] net: sched: cls_u32: Undo refcount
decrement in case update failed
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@...atatu.com>
> Acked-by: Jamal Hadi Salim <jhs@...atatu.com>
> Reviewed-by: Pedro Tammela <pctammela@...atatu.com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists