From patchwork Tue Nov 8 13:04:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 17038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2695321wru; Tue, 8 Nov 2022 05:11:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM425WBXMnQEo12yUCEm3ViUkPy+oxD80qKAEnbwTIuuAjy5zo+yRuS9uvD3PTEpfSB9ALSK X-Received: by 2002:a17:907:1b24:b0:76d:7b9d:2f8b with SMTP id mp36-20020a1709071b2400b0076d7b9d2f8bmr51920433ejc.414.1667913082968; Tue, 08 Nov 2022 05:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667913082; cv=none; d=google.com; s=arc-20160816; b=IJhaDvulaj5U9A58oCvvBmrsEOBTgkFJDjZYho4DJj/DvdntWwxqF/eg/KbjcS61pG a+kEM3aMQgcVjeP5w6dDh2iq/n100mFgecKRae54ipmFJLkOuw+zC+wK1ZRBvrwmUAGF 0IhYYomgo9J3Uby9kTKNLK0MWXzfHRTwbq2xf1DIp6IC8gB7Y7CzSOrQ71EZGwfTMN96 CJiJXWS2T6a7MGINIV86tWB0r6YsSKPtI9RcRil3rTwmrf3Z7k7AmTvrhc+W7EtUpgDT aD2MChDxmSqIibM6eQl9uhOqyasg4DwlFGj5LJA/98smKgBns+4l5lRiB2a5a4b4JbMM ISrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=XrPk+u5H6wV6RhzeY0I4pj9c6R9S+5/LG/rb7xv02mg=; b=qJ9FEgejR+v6KCVp5ZmypXHrz6fUpMxiPjEklkeoqBYkincisnZZ2bazoIrv6yB8IG 9FpJyQ7BXyU3zCNE/1J1QtHLrOTOp1hddZWibXIdU1NQm/6Ie70mT4Y76wG9koRs4oHY zLKEeIswyRi/CTL/1dLSxnLAh2RR6yyRNmNn94hwq1DZOsDBottahVq4boubxn6hLQSG V2G32LqC9gsoZjnHbX6rQYuwmq3PUv7yTITfuI0hF3dOLrf4CRVzrIvFp35AJE0XoDuT ETP0z/1k6U6FBLRFbFZA3pcIk23bQbvAAgTVbWcGtf2IPLySaDroEwnxPSuetV5yWoVS wssA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170906390c00b00780805b99ccsi9831103eje.648.2022.11.08.05.10.56; Tue, 08 Nov 2022 05:11:22 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233333AbiKHNE7 (ORCPT + 99 others); Tue, 8 Nov 2022 08:04:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234062AbiKHNEr (ORCPT ); Tue, 8 Nov 2022 08:04:47 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FD1C6159; Tue, 8 Nov 2022 05:04:46 -0800 (PST) Received: from canpemm500007.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N67bj20h7z15MPN; Tue, 8 Nov 2022 21:04:33 +0800 (CST) Received: from localhost (10.174.179.215) by canpemm500007.china.huawei.com (7.192.104.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 8 Nov 2022 21:04:44 +0800 From: YueHaibing To: , , , , , , , , CC: , , , YueHaibing Subject: [PATCH] net/mlx5e: Use kvfree() in mlx5e_accel_fs_tcp_create() Date: Tue, 8 Nov 2022 21:04:11 +0800 Message-ID: <20221108130411.6932-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500007.china.huawei.com (7.192.104.62) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748933628805180481?= X-GMAIL-MSGID: =?utf-8?q?1748933628805180481?= 'accel_tcp' is allocated by kzalloc(), which should freed by kvfree(). Fixes: f52f2faee581 ("net/mlx5e: Introduce flow steering API") Signed-off-by: YueHaibing --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c index 285d32d2fd08..7843c60d5b99 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c @@ -397,7 +397,7 @@ int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs) err_destroy_tables: while (--i >= 0) accel_fs_tcp_destroy_table(fs, i); - kfree(accel_tcp); + kvfree(accel_tcp); mlx5e_fs_set_accel_tcp(fs, NULL); return err; }