Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5526513rwb; Sun, 4 Dec 2022 23:44:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf62nEci/GqAsaSWPFPCrY5n6xr6RVG7/R0avfM4Y8BF+FeZf6CbK++9J30yNQFNN9mO5KN7 X-Received: by 2002:a17:906:bb06:b0:7ba:708f:2a03 with SMTP id jz6-20020a170906bb0600b007ba708f2a03mr45722296ejb.167.1670226281620; Sun, 04 Dec 2022 23:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670226281; cv=none; d=google.com; s=arc-20160816; b=mrm0o2f6MXL4QampfDsRtT+R/78yTe/V0KGKCgIMj3IXEAeRyCPcqBqQg/g25t515/ PLJL3FiHkIphndrbUM7yBL9hfz5pFWoicR6g9plWZ1v6hLIpMMIQQiuQx5LuHa2BqXIn +AJfoAH/i9POgoWwCybqy651cPqt/FLCIzj8GQQcDl2GO+gtlyDmSAg+j7pLtRuaZE/n MpJL6DVGfME3TV1clAkFroIipx+JIA/9Ia4AiJya/rvB4W8QU9VEyHgRmpHxqCUyiWVj QmBR6X9WWEiPiALNXbShlx308AVRqq9OxoE/1Q3ZzYUYf60HA3vyQLIn+0/yOYFEhf3q pnkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ktW+r6ZLlOqovc1mSkDejaEqDhJvALzvVNoVoeZAzSA=; b=nRPnes53y8Dk255+IjYQBCfen0yHk4gwSiVcRJMU7kAY8eabxpSNqiIN6/iBjD6XbU O40LL3/qtN05ugQcVuX+zT+VI4IjBON2XNfQ/YnORwooLkKvFalo7OZPl6ZSRAI9RC5b iI21nXGyZT4ZFuSNcKv2UUbE4VeZq9VbDFX//+1VRS9NZPBSPByIADlb92ZIZRpPh6Zo jBelrQf0zRbrpr5E+50/AYwfzKYONbTy3nrjyHtKl4ZCZELsWMcPxvcJFlFu9FIrJLJm b2uPNsQKiThUTNK4lRuigwu+8i9nQJOazMKpOy516lHA0SZqpk4wweZzT5yUUVU13I0R P2bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jUv33oHT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be8-20020a1709070a4800b0077951929340si11343227ejc.271.2022.12.04.23.44.21; Sun, 04 Dec 2022 23:44:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jUv33oHT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231750AbiLEHRG (ORCPT + 82 others); Mon, 5 Dec 2022 02:17:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231487AbiLEHRD (ORCPT ); Mon, 5 Dec 2022 02:17:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B53F712741; Sun, 4 Dec 2022 23:17:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4A10F60F8B; Mon, 5 Dec 2022 07:17:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA7CEC433C1; Mon, 5 Dec 2022 07:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670224621; bh=4t39H79w3UgII3zPKaC3pIYoax+Gz2ab6cnMuJDbjaA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jUv33oHTXYucLzOZbbNzXI3qK4BZ1h/LUslgnT5z4k4D4fUOCPpq+HYig4oQ0RD/v +0a/r2fA0B8uE0lx6K17pDEcImA5bww4jJ3hzdtvXkjJYdusMV/PIMRNrQWl1K5yt3 sFuGDGxjJiVtHasYwbXLWLP55OCu99lUR4xGHge+kIpzqU8549NKLVAsXzyDKKxtKg PrKVWoKr/1NkOhqSKuHpPJTCW5iFeSmuXhqjedWWr9N4XqMCRniQLB5WEAdb5tVOSr ruXeXb/IHOgsLiLEWBz+RA0fbkHoTw/L8mrqJnQDkeDlNacZCQengFl18LN9EE7mda YfRwFQR6Z/3BQ== Date: Mon, 5 Dec 2022 09:16:57 +0200 From: Leon Romanovsky To: Zhang Changzhong Cc: Andreas Larsson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kristoffer Glembo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ethernet: aeroflex: fix potential skb leak in greth_init_rings() Message-ID: References: <1670134149-29516-1-git-send-email-zhangchangzhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1670134149-29516-1-git-send-email-zhangchangzhong@huawei.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 04, 2022 at 02:09:08PM +0800, Zhang Changzhong wrote: > The greth_init_rings() function won't free the newly allocated skb when > dma_mapping_error() returns error, so add dev_kfree_skb() to fix it. > > Compile tested only. > > Fixes: d4c41139df6e ("net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver") > Signed-off-by: Zhang Changzhong > --- > drivers/net/ethernet/aeroflex/greth.c | 1 + > 1 file changed, 1 insertion(+) > Thanks, Reviewed-by: Leon Romanovsky