Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5590427rwb; Mon, 5 Dec 2022 00:59:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf63aEO2fw3f8Tvyn2meOz5l9RSESJwuSU16rzjcVfXLojjYkm1E17v/rzvLwiBR0+HMBijI X-Received: by 2002:a17:90a:4745:b0:213:1442:24be with SMTP id y5-20020a17090a474500b00213144224bemr91798552pjg.15.1670230772230; Mon, 05 Dec 2022 00:59:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670230772; cv=none; d=google.com; s=arc-20160816; b=flFrLApRHREcCdQFXmVSFbtL4h+1b4+TeCb/WpevE+lBp9DBMM+RJWAgLvx0JZ4onR +xbnhKxpOSc2oXZKigvb1lP5gU9crtpo+Izd2inLJy/pbO3hzWgIdQuFkByATF4ZNbkQ P29U/gOw3rNuej6FGTa4Nibkr2G4e2JKxQe5i32pNOAzIx/ef2OFqwRlBPJCbQFeGkHV lDitn0U0DfD2bufuVylWKYg8DYlZzGVifPtoA6qV8k5UBaAgrMOmJIT0kN4ULgIqNunf tTsY/AfFzDLRwYu3ttF08ISvvdvVxV8J8Enq93xh1MQUVyYwt4sBjRtQAnCX++Ou3qiH NLLQ== 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=JvFpx7zITSUkJbf9N0fRaFoQnsD52kzVckHag9fRENw=; b=i98jzNT+zw4V1Lajx8mZUGXqsc2UAf8nBo7v/HW3NTweAYE52b7Tgp0xAK7SqxtsRx 9agkN0j2/Myjg/XGmJUU5vLLatyn1y5c9/RGvI4fVEjfRUnuGdO3l1OqKLmfZ8eyj3rf L8byAmZ20FIHE+927K2f6WjkQ7ZbuXXeOCbDWLKJB98OmLBp33GluNI6tkHATsEn38t9 GiDKqguiMRMtN7KpNke1DIKJI59CXUURq2JbkjiTE2RKIDGcxI7MAJ+cZMz/9pctorxX Hk+RVuI7JfBUgiansnW3AXz2AmSxsNMaXPkIilEMjJsrPbh0VuF6W2pfcD/V3xOi7cA7 VsFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dR3TPQMw; 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 f23-20020a63e317000000b0047697505449si13615538pgh.365.2022.12.05.00.59.21; Mon, 05 Dec 2022 00:59:32 -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=dR3TPQMw; 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 S231846AbiLEIUV (ORCPT + 82 others); Mon, 5 Dec 2022 03:20:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231564AbiLEIUU (ORCPT ); Mon, 5 Dec 2022 03:20:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EC7215A1B; Mon, 5 Dec 2022 00:20:19 -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 ams.source.kernel.org (Postfix) with ESMTPS id 4B4F4B80D6E; Mon, 5 Dec 2022 08:20:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31242C433D6; Mon, 5 Dec 2022 08:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670228417; bh=yVN35cHrzVki0JCU53F4oiW28cwbRdKaotWUuvMjBXs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dR3TPQMwaQiMzz7epZwwjLSciKqXvaBoCaOZgh8/6c+13ExQdfK339VbDth304oVV ZF5MgGGbGdVtjk2kpF39+oXkSOvFTsd+S33cNYsp1hHbmDYkcP6Aoa1iYv6BXTN+od BBKWUt7kai61tBMRhgdmP31ZghswTGS8HVvZpEdzzlJmoE32r4aiJ8nQc+21ayDEfk utuHrI3AdWXBgVP3TLbGBeE0TXNN3M3xTIEVpFbgqcFBF/gex4WNo1zKLUGO0awtaI jWf9664c3lAtRVp/TgKe9LVVf8sN5Bigf2brFiiIN8ysgG4YF0vCy37VQLqxJy4pLy mtRX215O3wfwg== Date: Mon, 5 Dec 2022 10:20:12 +0200 From: Leon Romanovsky To: Zhang Changzhong Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michal Swiatkowski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] ice: switch: fix potential memleak in ice_add_adv_recipe() Message-ID: References: <1670225902-10923-1-git-send-email-zhangchangzhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1670225902-10923-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 Mon, Dec 05, 2022 at 03:38:22PM +0800, Zhang Changzhong wrote: > When ice_add_special_words() fails, the 'rm' is not released, which will > lead to a memory leak. Fix this up by going to 'err_unroll' label. > > Compile tested only. > > Fixes: 8b032a55c1bd ("ice: low level support for tunnels") > Signed-off-by: Zhang Changzhong > --- > drivers/net/ethernet/intel/ice/ice_switch.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky