Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7416098rwb; Tue, 6 Dec 2022 05:37:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5EEjDXjqGSHo1Dfh735j1bZUx7EY3FXqgRVA5VTj8pBAXAQlRN6Vq/ern9XLFxYZXK4XQt X-Received: by 2002:a17:906:2bcb:b0:7b8:4d91:1bcd with SMTP id n11-20020a1709062bcb00b007b84d911bcdmr54472711ejg.239.1670333854996; Tue, 06 Dec 2022 05:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670333854; cv=none; d=google.com; s=arc-20160816; b=f2LXRhEYbjX85yIkytj0oKxZdPyeX+etAVrGx3b/VL/GjQtlG2/KA7gtDxhnAqYJ4v o8WHu5uEXMxqEqcyf8mBspjWLrjZRy4gUipD5rq4fGkWyEnWeZWJFcSV5PglGS6dm1cz V2LChgu+KnJ7OWMkIKbMqBvFRGRqFlznBS/RXm0l4CVrnj5QhrtBYuTMO5t6pZHjgyWC O1aqBuxIes2ND3d7qAdYpQutPd3QK4c02OmrmHfUAUt7i1hPUMEDOEOrxw3uF/xsm94m kARMQT3d1DkNFxlPor74ucRmjPvgz65rLw5vOC4MNnJSObBjU7lRBYB2yv6w/pFg6vrr lEzg== 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=uycol23sLMJvKSN/Uf+hAHaSexrmgv6QP0a0Ox9Q4o4=; b=ERSMv3lWrImbQfVkRsw7Mx3d03ZLTbDJtSXa3I5KsR2crW/cQ0dQScnsK3JLOE+U/J XnnUcfoTluZdIVbgCYBYhNHtkIgpAh7WoLZ8ikQbFDX3xBkUBdVSjIRcIMCny3OojUZo n3LYMYuNcpgMjjKoFYYPa0v282LCf1RdGJp5FR85c0ArEAlG784bfaXbV64Txy+aDKaz j7lFUDQ3waWHP9wsnQdGakqsQDfFLW2kiJdgTN0dLHMC+4jIDEOdmrVMglhMBXxOKvWZ mEkQFS0JOYR/DeO6m64TIBxhzMv8k7mP2Vf+76HZ45LP1ncvhQEc+seyBB1tcNu0iRII jwLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=i0qmxSRb; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a170906684d00b0073da5c8de1asi11028683ejs.178.2022.12.06.05.37.15; Tue, 06 Dec 2022 05:37:34 -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=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=i0qmxSRb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234111AbiLFN2D (ORCPT + 79 others); Tue, 6 Dec 2022 08:28:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbiLFN17 (ORCPT ); Tue, 6 Dec 2022 08:27:59 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D376422524 for ; Tue, 6 Dec 2022 05:27:52 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso14252062wme.5 for ; Tue, 06 Dec 2022 05:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uycol23sLMJvKSN/Uf+hAHaSexrmgv6QP0a0Ox9Q4o4=; b=i0qmxSRb3waD4rxuHBCB4ucip+pAeuTwiZiojywQQLgL57PhZxX709w+IATXT/K62P 0fRN9Kl0PLOMfFWahzeM3pD8VBNEgoQSqLodQ6CogsuhWlA5nkzSl5wVMl+KP0cUNnTo SLIeTPxs/WSD7LrrKwWm5du/ggUj38ZuFPnNknFZNZd9TDzaOXANwQ32QEcVauqRor78 t/QS7meh8yvSUiSnLHoCWxFXGawsCVEvXN0tqRUvFAnh7HSjJQR87bTopt5XOycvhBzu G9zEv2YRt9kqOI9VPhrjz2Rx3i3NcaqZTdWvXs0teBvJN+jpdOOfY9qKAYJjnQCkcFfp oP9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uycol23sLMJvKSN/Uf+hAHaSexrmgv6QP0a0Ox9Q4o4=; b=YB5q6zpc7FPApdCsHPAcyRtdZfz+xtPG0xPIn9XEJklhInwKlx9I6llywIwDSETwnT da0zUSRgfrzeq7UrrfM/IN90Xv0du9J4Sg6m7czFKaZTz7fhucgx4+7paUSfnrBM2SZz BtaVhdTwHkvw9PRgYhZGadhluJyDtreVejw8FKgJV5tHjoHH8gSb5A/V4Hbg9CM+orEu RSl8jYLh0sZhGGKLTMRoh9s/lPr5oWssHWp8PGQmM5mI0Qdu0OcMGlPKBdyxIP37G0Gd iU8c4UZXJGxO4dcrDh/8GeIcipv3TTL2w+fag/sCVSZoVr1KhbGL4We61Az8vmW3yXbs soEw== X-Gm-Message-State: ANoB5plFq8F7AeCj/dW7VSy8bSCAp8pv3JoF7/Efwk1sPvctNLmuqeSj n4Rn25KVryB8v0T2rCyII66b/Q== X-Received: by 2002:a05:600c:1c09:b0:3d0:4fcb:253b with SMTP id j9-20020a05600c1c0900b003d04fcb253bmr33255121wms.199.1670333270983; Tue, 06 Dec 2022 05:27:50 -0800 (PST) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id i1-20020a05600c354100b003b4868eb71bsm26978780wmq.25.2022.12.06.05.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 05:27:50 -0800 (PST) Date: Tue, 6 Dec 2022 14:27:49 +0100 From: Jiri Pirko 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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 Mon, Dec 05, 2022 at 08:38:22AM CET, zhangchangzhong@huawei.com 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 Reviewed-by: Jiri Pirko