From patchwork Wed Mar 10 19:03:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12129129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EB07C41621 for ; Wed, 10 Mar 2021 19:04:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A5AD64FB1 for ; Wed, 10 Mar 2021 19:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233844AbhCJTEX (ORCPT ); Wed, 10 Mar 2021 14:04:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:44410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233764AbhCJTEC (ORCPT ); Wed, 10 Mar 2021 14:04:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ABABB64FCC; Wed, 10 Mar 2021 19:04:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615403042; bh=bpVODYW5UVZnEOudgLhN4U32hjj1tMuDqmKxMhtCbaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T5a3RTKNvIHauz8lFIDZblhgqd9No8wfH2wlNeIvmw1WDKVhFs/jSDzOm2eqhK4zz Y8tQHQwGO63ERS7ZuZ2w+QpB+HVNnDDN9pRLcB+qyC82qmnZoMfmdQuKR1reNUzLFL Dhpk8EttHIczCWthSLPdj93UXVNJzAfUGjiMnRfPE7+sL5XUCS0rhICXMGs7geCMnn S528onk6V/pJAdXBbvyuLpCRTj/CcAHamHKW0/6oybZAKiEcSUcBzf7jwUh0AeODUj y1/lsdHAULDummYOWhTw24qSL/kZTIkYZK6xBo4rf1Y0H3EhHTiNe3NhC/l2B9Buin rJSFhCLGUhXkg== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Shay Drory , Parav Pandit , Saeed Mahameed Subject: [net 16/18] net/mlx5: SF: Fix memory leak of work item Date: Wed, 10 Mar 2021 11:03:40 -0800 Message-Id: <20210310190342.238957-17-saeed@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210310190342.238957-1-saeed@kernel.org> References: <20210310190342.238957-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Shay Drory Cited patch in the fixes tag missed to free the allocated work. Fix it by freeing the work after work execution. Fixes: f3196bb0f14c ("net/mlx5: Introduce vhca state event notifier") Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c index af2f2dd9db25..f1c2068d4f2a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/vhca_event.c @@ -94,6 +94,7 @@ static void mlx5_vhca_state_work_handler(struct work_struct *_work) struct mlx5_core_dev *dev = notifier->dev; mlx5_vhca_event_notify(dev, &work->event); + kfree(work); } static int