netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] net: sched: fix unbalance in the error path of tca_action_flush()
Date: Thu, 15 Feb 2018 20:05:16 +0100	[thread overview]
Message-ID: <1518721516.2606.92.camel@redhat.com> (raw)
In-Reply-To: <216a671c-f8ec-b53e-dec0-bae8ba94fac0@mojatatu.com>

On Thu, 2018-02-15 at 10:31 -0500, Jamal Hadi Salim wrote:
> On 18-02-15 09:50 AM, Davide Caratti wrote:
> > When tca_action_flush() calls the action walk() and gets an error,
> > a successful call to nla_nest_start() is not followed by a call to
> > nla_nest_cancel(). It's harmless, as the skb is freed in the error
> > path - but it's worth to fix this unbalance.
> 
> Kind of pushing the boundaries saying this targets net tree - there is
> no bug you are fixing (as you say the sk is freed).
> Maybe it makes the code prettier ...

you are right, this fix is only cosmetic as long as the skb is no more
used after walk() returns an error. It just triggered the doubt to me
while I was reading the series that added support to ext_acks, and this is
the followup.

David, please apply to net-next (or drop it, at your convenience).

thank you in advance,
-- 
davide

  reply	other threads:[~2018-02-15 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 14:50 [PATCH net] net: sched: fix unbalance in the error path of tca_action_flush() Davide Caratti
2018-02-15 15:31 ` Jamal Hadi Salim
2018-02-15 19:05   ` Davide Caratti [this message]
2018-02-16 20:43 ` David Miller

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=1518721516.2606.92.camel@redhat.com \
    --to=dcaratti@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --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 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).