Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp479887pxm; Wed, 2 Mar 2022 02:24:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJ9jeFuzM9+kTprXpgPDhU+ues5mUgIDg+3s62FJCUGEpomUaV7dJpVxw+xphprefOnTUE X-Received: by 2002:a05:6402:51d0:b0:415:b49f:dad4 with SMTP id r16-20020a05640251d000b00415b49fdad4mr2685571edd.370.1646216698444; Wed, 02 Mar 2022 02:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646216698; cv=none; d=google.com; s=arc-20160816; b=KXIOHVlfOeGo5Z/anwyVnSaEQEfNbFFYWta7Cs6BZppR/UUDNblpxmGMe5g5GyMSKi UF5FhoLFqXHAcvS9iDh0HTUBTZLsHFj8RVMdMENCIzDkmTvrftBwsI/95UQ8sf+33AKh z/VJbYl1OYiQOsMd8p5ytdRN8TYD4dUxUXcNZi12HWnLTWG0od4kVClU0XFQPpfQDGdO B/vOW/3sZoFyfga0L02n0vAhpMX0MYhamiHTs4XWRLbIEGor78cAtB7brSVfP07AD7Gf SXzN0smAKq6IXY4drJbpBrbl0Ly3tg+uLzdo1ZOiAjF+AJdaEbLnIXcxUc+SGEVMeBDv n+CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=rHLFblMbbfNav/XdiP6FHe9IkRNGVNtS02Y0rz8ieEs=; b=l9e1x+9mnPM0U27XLBQRDJ6sHcBe4qENcJOTZ/cBHtmqVpUjsKXvhizzLHw2m4yEAP l+HFb+TCg7Sl2kqKeljNYLAcs4+1KJbyqIxvfG8t6OklQThT0bTAS/tkqkoI+FONX6OS 9ayydbFfxFSLt0nhUBPLGxPliXxVxDo3EiW6C0jbYR27NMZLvVmJE9jUk/3wLU2Sguo6 k+8Ir1btfqWRC212PIc8rg320+fF1JbXBTiDsrvXEiOa1g1i8SwTsHDoncHBQDMsGvQp 1GZkZ78GSKkrMXlyaql1O2JFteFD9n7rUsxj3J5AatQ+x3zRIqCZrge+zmBjK4qtQxvh XJ4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EZZ7IU1/"; 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 b1-20020aa7dc01000000b00410b5ff6c72si9817230edu.67.2022.03.02.02.24.35; Wed, 02 Mar 2022 02:24:58 -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="EZZ7IU1/"; 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 S239055AbiCBCPo (ORCPT + 99 others); Tue, 1 Mar 2022 21:15:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233943AbiCBCPm (ORCPT ); Tue, 1 Mar 2022 21:15:42 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E37CA6476; Tue, 1 Mar 2022 18:15:00 -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 0A00AB81EF4; Wed, 2 Mar 2022 02:14:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 639DEC340EE; Wed, 2 Mar 2022 02:14:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646187297; bh=9pvrzJsTQc1+kpXew6pVudNtyCN7dFOr33TlfTRA5MI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EZZ7IU1/sbdfwBIK9m/aTzbhrlEceYi7Oq086hyn5s5hyX58aQ2Gn6wYXXfeQQgg8 Hj1IvW/xHRGfsaOppGXqeNmaeu8ismKd/5XYUq3rKpxbujjsK2nvdp0Hf/ljYPPdcY ax/jaC7XPkpEJeZrvBK8XUHR2CHq1yy4koWjDTaiiCV02FcaMD4fvK9gfZj7jNjpLK ylQuD+w0gYMw30fbRji8O9MRvPgQPYYnM20uffAYhDElYjbhtLB9x/2mMOgIih17gy rYVqZe81UeomIoAXAhh0fA5kQhU6lXlSV2ZKOsJj3VxvK8ujZ5h7WJXLDZqKN76r8x l0xcGKEsFYtAA== Date: Tue, 1 Mar 2022 18:14:56 -0800 From: Jakub Kicinski To: Q1IQ Cc: ioana.ciornei@nxp.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lyz_cs@pku.edu.cn Subject: Re: [PATCH] dpaa2 ethernet switch driver: Fix memory leak in dpaa2_switch_acl_entry_remove() Message-ID: <20220301181456.3678a4b0@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20220301092450.42523-1-fufuyqqqqqq@gmail.com> References: <20220301092450.42523-1-fufuyqqqqqq@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 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,T_SCC_BODY_TEXT_LINE 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 Tue, 1 Mar 2022 17:24:50 +0800 Q1IQ wrote: > @@ -182,6 +183,7 @@ dpaa2_switch_acl_entry_remove(struct dpaa2_switch_filter_block *block, > DMA_TO_DEVICE); > if (err) { > dev_err(dev, "dpsw_acl_remove_entry() failed %d\n", err); > + kfree(cmd_buff); > return err; > } Same comments apply to this patch as to the other patch you sent.