From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0F12481A7 for ; Thu, 7 Dec 2023 17:42:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hO5ooNVg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3035C433C7; Thu, 7 Dec 2023 17:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701970942; bh=XActvnt3u4hVPQCbSWjczs0CUksp+uATv6dyECFr7ds=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hO5ooNVgtmHhpxNK2pAHaJJKLA0UwCH3ibX4kDCSuEbRyjoZ5qSC7cygJUi9d+/M+ SkzDG3gw1QKcPt9H5zbhqdQhGboNQUmbpANZMA8WAMb/pOU6pgoTA8v9CXKYFA4jLR c1k9utyZwmRhhfFehCNCQexO5GVAWtka2DJ7BphUiwYyiSGmEcWSOweJLfIRhsmxZe H4DT3Rv4O9VG/Si5ASZfjcumvO/yAsNjsQmXqfgdFRHylHPd12jaZwn6WydZ6QttdN hva/cZFoy+fBfirtYNBmPXzbWiSJfnHJ+6PUnba4sbmOJrH1t+mWyWxHL5M3y0X1Y2 5Pvzis3iLwoFA== Date: Thu, 7 Dec 2023 09:42:20 -0800 From: Jakub Kicinski To: Suman Ghosh Cc: Zhipeng Lu , Chris Snook , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Yuanjun Gong , Jie Yang , Jeff Garzik , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [EXT] [PATCH] ethernet: atheros: fix a memleak in atl1e_setup_ring_resources Message-ID: <20231207094220.77019dd0@kernel.org> In-Reply-To: References: <20231207143822.3358727-1-alexious@zju.edu.cn> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 7 Dec 2023 17:08:15 +0000 Suman Ghosh wrote: > >+ kfree(tx_ring->tx_buffer); > > [Suman] I think we should do tx_ring->tx_buffer = NULL also, to avoid use after free? It's up to the driver. Some may call that defensive programming.