From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net: sched: act_ife: always release ife action on init error Date: Thu, 16 Aug 2018 12:12:48 -0700 (PDT) Message-ID: <20180816.121248.1512650423404982842.davem@davemloft.net> References: <1534267796-9841-1-git-send-email-vladbu@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us To: vladbu@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:60306 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbeHPWNE (ORCPT ); Thu, 16 Aug 2018 18:13:04 -0400 In-Reply-To: <1534267796-9841-1-git-send-email-vladbu@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vlad Buslov Date: Tue, 14 Aug 2018 20:29:56 +0300 > Action init API was changed to always take reference to action, even when > overwriting existing action. Substitute conditional action release, which > was executed only if action is newly created, with unconditional release in > tcf_ife_init() error handling code to prevent double free or memory leak in > case of overwrite. > > Fixes: 4e8ddd7f1758 ("net: sched: don't release reference on action overwrite") > Reported-by: Cong Wang > Signed-off-by: Vlad Buslov Applied, thanks.