Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp404828pxb; Wed, 3 Mar 2021 06:20:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJy81Tl9IB6ijnUWim3WIVTS4gdGWay/AOeqTelh2bPv5TP8Sh3kuF3DrxGuVzOhPOSBb9eG X-Received: by 2002:a17:906:2692:: with SMTP id t18mr25432036ejc.16.1614781202435; Wed, 03 Mar 2021 06:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781202; cv=none; d=google.com; s=arc-20160816; b=sZ8PPTk10ZDOvQgx17ffC2L7hr2m90UhCMjoR6+bKStTtsRpxwoH/RDS7HL2RkocFH tj9pOJfnqC9SNEl379y5l5n65I6NzWXgHWwZ3RLN12Rq2lxDXBrrJnPfnMgin3VA4v0T nbPsoFWWHcgWHhY9lkZMhnOY/NlHIoXGWfcn5zgy3NQsvHD1jqtZMDniHTtxpsLmhJeO OZwthhqUnik2+OuwDaBfpnb20w/yvim945LHt+lXlgu3XEGsYuaBzb6JD9+oOpB3sDqc u8Wmvt2ZBAcq+8I1XJBwYcOS71jDQFgM8Bc49dwKUPtvNvEdI/TPHaq+8OBNmxS2a/JI 4dJw== 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=Ul/7qKWJRvoMXGhmd+pz2/QqnVOG38Vwvk7ieceOqTI=; b=z5YGZys2hDA2eo5HpEXgNxXTybq9u8ktoO4tm9YtDlYysOeac5ZNLdcirXnYfvmTXR Yrc60cUPJo/p9AiOrpbHKRL8lASi8O6NdmcalE5XxcEOXL+z4bidWyOei2s/M524wUYw M07KaIzenCOOVXmWekNUZ2I7HtDYUcG6V8Bi5F9ttrUxIaJT1CbhxPDl9Iim6SkpnvV4 LMfiw6kV0XMCh4CsX9ahtKW9EwvHkWzp388LIo8aX+N3gvYGWR2h2UFEK7wkx0yuOg3u KsCmSgnAh2sbfnNT+7bfpQlSUX0ze8iGcIH71YCprvzR9as3RgYYHSfUMk38b23DUsnQ W3Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oSeIcv9F; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qw16si12793244ejb.673.2021.03.03.06.19.34; Wed, 03 Mar 2021 06:20:02 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oSeIcv9F; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243886AbhCAVCv (ORCPT + 99 others); Mon, 1 Mar 2021 16:02:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:48406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234553AbhCARL2 (ORCPT ); Mon, 1 Mar 2021 12:11:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9437164EE6; Mon, 1 Mar 2021 16:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617000; bh=pACoqiolkYuIa6GBZx1fWD/OqGrN77osjNpPo5WuNQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oSeIcv9Fr46CZ3/XHX+w/7ANpgL7AN0nHzdyUd08wUL/s3BM8jeerdpde3qVRjCN1 gTGROWbHpcvWeYNuNM1TpBd5DGExZu7wwfq0OQW0xAWOJ854XH4vGqhaBkdc70YQCL lTxgUrWUsWeTxkVoYGS8o4OZGsSGgy7z7EwD4FFg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Tariq Toukan , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 168/247] net/mlx4_core: Add missed mlx4_free_cmd_mailbox() Date: Mon, 1 Mar 2021 17:13:08 +0100 Message-Id: <20210301161039.884095029@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan [ Upstream commit 8eb65fda4a6dbd59cd5de24b106a10b6ee0d2176 ] mlx4_do_mirror_rule() forgets to call mlx4_free_cmd_mailbox() to free the memory region allocated by mlx4_alloc_cmd_mailbox() before an exit. Add the missed call to fix it. Fixes: 78efed275117 ("net/mlx4_core: Support mirroring VF DMFS rules on both ports") Signed-off-by: Chuhong Yuan Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/r/20210221143559.390277-1-hslester96@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index a4c1ed65f620c..550e4893253ee 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -4990,6 +4990,7 @@ static int mlx4_do_mirror_rule(struct mlx4_dev *dev, struct res_fs_rule *fs_rule if (!fs_rule->mirr_mbox) { mlx4_err(dev, "rule mirroring mailbox is null\n"); + mlx4_free_cmd_mailbox(dev, mailbox); return -EINVAL; } memcpy(mailbox->buf, fs_rule->mirr_mbox, fs_rule->mirr_mbox_size); -- 2.27.0