From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davide Caratti 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 Message-ID: <1518721516.2606.92.camel@redhat.com> References: <2254dab886c72ff9635b0d1a26e659d7bb31a55c.1518705847.git.dcaratti@redhat.com> <216a671c-f8ec-b53e-dec0-bae8ba94fac0@mojatatu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Jamal Hadi Salim , Jiri Pirko , Cong Wang , "David S. Miller" Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161045AbeBOTFT (ORCPT ); Thu, 15 Feb 2018 14:05:19 -0500 In-Reply-To: <216a671c-f8ec-b53e-dec0-bae8ba94fac0@mojatatu.com> Sender: netdev-owner@vger.kernel.org List-ID: 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