From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] qed: Fix potential use-after-free in qed_spq_post() Date: Tue, 16 Jan 2018 14:57:52 -0500 (EST) Message-ID: <20180116.145752.1483453106774774130.davem@davemloft.net> References: <20180115202449.14830-1-roland@kernel.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Ariel.Elior@cavium.com, everest-linux-l2@cavium.com, netdev@vger.kernel.org To: roland@kernel.org Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:59096 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513AbeAPT5x (ORCPT ); Tue, 16 Jan 2018 14:57:53 -0500 In-Reply-To: <20180115202449.14830-1-roland@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Roland Dreier Date: Mon, 15 Jan 2018 12:24:49 -0800 > From: Roland Dreier > > We need to check if p_ent->comp_mode is QED_SPQ_MODE_EBLOCK before > calling qed_spq_add_entry(). The test is fine is the mode is EBLOCK, > but if it isn't then qed_spq_add_entry() might kfree(p_ent). > > Signed-off-by: Roland Dreier Applied, thanks Roland.