Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp616046ybg; Mon, 1 Jun 2020 09:48:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlGLmtBzVNhI21DjxO7R+WDi55QefHz6o3+2cnqf2qDPxBL2sPJV2Ywg4ZuS2kQlIRU8vG X-Received: by 2002:a17:906:fc13:: with SMTP id ov19mr8675811ejb.212.1591030091615; Mon, 01 Jun 2020 09:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591030091; cv=none; d=google.com; s=arc-20160816; b=k7jVxduYD9x8qujUqhq0qW7clmFfDhsKR/Q/cVyfulzJedF6yMxkoSjnxcsM4/uCv9 dlSGeGb8eNP3B1kPizvS3AyEjzbeGoe/LXFDrHV+M1R3M26hoYnHAMPuELT+NvqJMCTj nup+jZsHKapJyE/0Oms4pqLgayLHFYj6NkgE3KbIF85YquYl9odhL7dWb/sJHiZygn2b yhp7r3gOeL/Oi9jcGJgCXLrjgy+JAgCO4bwXdezA/tjRnjPO6t52k+bKs3/Os4oEdIN8 Aq0DNEdLQXKRwbDCXvLOrmcL54gbRIGKjlBeH50fwXrU1MLLAAsdG9orEhExNjTgLyNz Q4PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=L4x8df+FWwhO9CVIfOrtORCmIfKK22E1tDxPOTpXN5A=; b=YqQmi6d2sUR7GxFJDuSd2lU+st33Zm3o9f1sUIA6d/UYOhpjmKysjGQmtUZ8AGBIuo DWvp9sxiK4JXiY1czIQdt2g7Hh44hxze2bnKQZyaoUNtyzhMRYqdPyFZrMo3JTBbZSh0 C0lgy1rSp27OZsZDh/oYNCv87YAIIlGQ/toIYmDwcmKC8SWEjcLzboDi2OgisRmJfEd4 Jx0eR4RdFXe9fCjw7hs1UkMC9znfgu6+VRFpKbxWlEjRFM3JwuYZ9moY5kshRHJbFExy 5tERB46b7AMUjaK3dX8RArMV8AQ5o5LHLmmyEJXavor8yIQRLYHhPJp0Mc3K3J0BFYWq JBGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si11784ejr.283.2020.06.01.09.47.48; Mon, 01 Jun 2020 09:48:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727808AbgFAQpm (ORCPT + 99 others); Mon, 1 Jun 2020 12:45:42 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45496 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgFAQpm (ORCPT ); Mon, 1 Jun 2020 12:45:42 -0400 Received: by mail-lf1-f66.google.com with SMTP id d7so4289590lfi.12; Mon, 01 Jun 2020 09:45:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=L4x8df+FWwhO9CVIfOrtORCmIfKK22E1tDxPOTpXN5A=; b=jMYlF33eeg9WmJ+6Vi/Uu2VVNPTMBe5oCe/clmgJOkHaGrZwVXhjdb+XBHalXjXqAa hxB9rWx6MqmQHD6oFwFaMVoEhg5+45kVb3aDiFexPgLnB2nNIF2MdsG+CPuBJ4w/PGcc DXH+GzKp9TWm3enMrSDnCvKNrGxWtc/lnLSpZ6r01yRVAx/xvcSZEm+Gq96Cod+Ute3e s2bSUL639xBP0njFEph6bpB8sAgDDKbtYdjQhQlFDqWtCd01P2dL1KLM4RMa1MQg2sho 83GEKkgq8R5/OZSgfDzyBxLvYLb+qDzp0mMAzcGoA1vra7WuXAOSf/EpzCAgcENNze53 qeVg== X-Gm-Message-State: AOAM530femQKKB+0ThsKBHXYVGmWtNxSFOpkssnCyTB8kw3kcmrcLvMB oovJlxfddAXsfv/vCX3kOuY= X-Received: by 2002:a19:d57:: with SMTP id 84mr11809132lfn.112.1591029939553; Mon, 01 Jun 2020 09:45:39 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id 4sm11062ljq.34.2020.06.01.09.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 09:45:38 -0700 (PDT) From: Denis Efremov To: "David S. Miller" , Saeed Mahameed , Leon Romanovsky , Alex Vesker Cc: Denis Efremov , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] net/mlx5: DR, Fix freeing in dr_create_rc_qp() Date: Mon, 1 Jun 2020 19:45:26 +0300 Message-Id: <20200601164526.19430-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable "in" in dr_create_rc_qp() is allocated with kvzalloc() and should be freed with kvfree(). Fixes: 297cccebdc5a ("net/mlx5: DR, Expose an internal API to issue RDMA operations") Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c index 18719acb7e54..eff8bb64899d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c @@ -181,7 +181,7 @@ static struct mlx5dr_qp *dr_create_rc_qp(struct mlx5_core_dev *mdev, in, pas)); err = mlx5_core_create_qp(mdev, &dr_qp->mqp, in, inlen); - kfree(in); + kvfree(in); if (err) { mlx5_core_warn(mdev, " Can't create QP\n"); -- 2.26.2