Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2139539iof; Tue, 7 Jun 2022 21:04:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy33rtPDKmz/1fI+V1+mEPYfqZjmjfkP2Hpts4Fi+P/h4FQFDZHaznCJMZvcm9pmNxmGHFT X-Received: by 2002:a17:90a:e7c8:b0:1e6:961f:999d with SMTP id kb8-20020a17090ae7c800b001e6961f999dmr32071060pjb.23.1654661071635; Tue, 07 Jun 2022 21:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654661071; cv=none; d=google.com; s=arc-20160816; b=eurlc1ceVKT9vd+iY4fy68GlHaBSlzSE4yb+ezZWKQQbxVDFpzXrC02e562olWWmCc xqC3feOtthQXL39hKJKzkVfx40Pk9y8HMsK65Y+kC17ophhoeP5LpnDufPTIdEnsNXGe rlm0NZhc5kMKU80qcS8fm6DQNSaJ+JnCxmyufx7vQ2iG/Uhrljzb0McikWkgLTgX3M5L Qzf1AQliPttv6jl4OFr/0iNC4eHSPqGERnxVJTI48qPZh5//RejaTPScL10dKNvem9xx /1I6Wwb3B4mC4Lt/Mq3yWa5mptqHLfpA4pJEqa1vSal76cnEzEAAYeGBzQ6GypZKgIQe faAQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fnAmKzK3Om6l+pvcj4GbrcXut2/fpUI961hmAQBBuhc=; b=uxBLs3GbwOQPv++0SPTwUrUSYyqPzljZbtt3ss55JE79AhB1cH+ZPO6tZ0oi9fuoGM WyPCmrQoMUm5Z+BDhnP8lkbpJf7BoYISZA4OqMcALKEyRWu1O4Pv7HJM7H2ZwX3pzpvZ 7LOovoymljqlAtIkjHkSKlZZJ/4D6J58Z1ZTSRz/iChdfrU7JFjcab7/2vUVslXknWYl G1KD+3xcs1sFHa3IrCmXBZmb2gO8hDM+Bss78etS3qKInguonpWPbf0UxXmlQV6i8SFv Awlsp+JHT43tSoAbCwdQuRylxcXQidwvFdnikklOkPqIp3ugsNiGH0xWuMB9wNVtum9u daWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0LwxNlBW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 79-20020a621452000000b0050fea04c5fbsi23634203pfu.42.2022.06.07.21.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0LwxNlBW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 53C752C035D; Tue, 7 Jun 2022 20:30:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384451AbiFGWLr (ORCPT + 99 others); Tue, 7 Jun 2022 18:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379009AbiFGVJ0 (ORCPT ); Tue, 7 Jun 2022 17:09:26 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6054D213E7B; Tue, 7 Jun 2022 11:51:20 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id 92FC4CE2425; Tue, 7 Jun 2022 18:51:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F935C385A2; Tue, 7 Jun 2022 18:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627877; bh=wWAvOVOPQT5CaVYQmJhM10amzags21436o88ZdkxGgQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0LwxNlBWNyt/fCLkbc2h6IB8ekgWpW3QPTxgVslK05J4+HzmIks+INDsjc+ASwCfs 0SE5GkflgxyHHYVJHPXPcJek2Utidj6KwFEaZSjxDX1eVt6/cg2IGU3VgUeYhJaw0m 8Tw8VuEOf7eIPwRsedRgOINaJAV+bfUc/2yIKvmc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ziyang Xuan , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.18 126/879] net/mlx5: use kvfree() for kvzalloc() in mlx5_ct_fs_smfs_matcher_create Date: Tue, 7 Jun 2022 18:54:04 +0200 Message-Id: <20220607165006.358583026@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Ziyang Xuan [ Upstream commit c389362096be8ee69ec3a163a0699a31e84b8451 ] The memory of spec is allocated with kvzalloc(), the corresponding release function should not be kfree(), use kvfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Ziyang Xuan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c index bec9ed0103a9..2b80fe73549d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c @@ -101,7 +101,7 @@ mlx5_ct_fs_smfs_matcher_create(struct mlx5_ct_fs *fs, struct mlx5dr_table *tbl, spec->match_criteria_enable = MLX5_MATCH_MISC_PARAMETERS_2 | MLX5_MATCH_OUTER_HEADERS; dr_matcher = mlx5_smfs_matcher_create(tbl, priority, spec); - kfree(spec); + kvfree(spec); if (!dr_matcher) return ERR_PTR(-EINVAL); -- 2.35.1