From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933864AbdERPba (ORCPT ); Thu, 18 May 2017 11:31:30 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:44420 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932474AbdERPb2 (ORCPT ); Thu, 18 May 2017 11:31:28 -0400 Date: Thu, 18 May 2017 11:31:26 -0400 (EDT) Message-Id: <20170518.113126.77172400948863631.davem@davemloft.net> To: colin.king@canonical.com Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sched: fix a use-after-free error on chain on the error exit path From: David Miller In-Reply-To: <20170518140702.6072-1-colin.king@canonical.com> References: <20170518140702.6072-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 18 May 2017 07:49:56 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin King Date: Thu, 18 May 2017 15:07:02 +0100 > From: Colin Ian King > > Set chain to null after the call to tcf_chain_destroy so that we don't > call tcf_chain_put on the error exit path, thus avoiding a use-after-free > error. > > Detected by CoverityScan, CID#1436357 ("Use after free") > > Signed-off-by: Colin Ian King Colin, you really need to make some adjustments to how you are submitting these kinds of patches. First of all, you must indicate the target tree in your Subject line as "[PATCH net-next] " in this case. Also, you need to add an appropriate Fixes: tag right before your signoff. Thank you.