From patchwork Thu Feb 27 13:37:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 230325 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 EFCA3C3F341 for ; Thu, 27 Feb 2020 14:24:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD27D2469D for ; Thu, 27 Feb 2020 14:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582813493; bh=OWTPxU+/A5iHErJHBufe6ko4/tT/IkEB8jQDEA3c+Po=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=xe8PMTpaUGfdNLo4J5X61FgLah2DbvHyTX4xiRS0CnNc6WJvJ9QTyeZVHBHOUuK3B VVv6X+2M3dgMPbfDJXMlJOTcmStRvG9aZtwpis8qlSOQ08Mn+FAVLxUnPQCjqosFa1 L5m0oFiKPzCMjQtelMyPRqYYP01ZekG1s9oUsKwA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388823AbgB0OMU (ORCPT ); Thu, 27 Feb 2020 09:12:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:50982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388653AbgB0OMT (ORCPT ); Thu, 27 Feb 2020 09:12:19 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73ED420578; Thu, 27 Feb 2020 14:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812738; bh=OWTPxU+/A5iHErJHBufe6ko4/tT/IkEB8jQDEA3c+Po=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ivmO1LoR+aa88Bk5VLVcHlN3/12BR5nG4BdjsXGNenNOFPqLPglKu0U64Ze1d17aL ODXwtuf4Vh1ffZg19bUGJMwrwkdtkvzxfu0t1AbsoGwmyblorit/DOKZ6UmJ3zsw8h Z3tFH6X2B8DDCYazVjRnGfjrOsWU755ofcpcPNoc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aya Levin , Parav Pandit , Tariq Toukan , Saeed Mahameed Subject: [PATCH 5.4 132/135] net/mlx5e: Fix crash in recovery flow without devlink reporter Date: Thu, 27 Feb 2020 14:37:52 +0100 Message-Id: <20200227132248.906407764@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132228.710492098@linuxfoundation.org> References: <20200227132228.710492098@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aya Levin commit 1ad6c43c6a7b8627240c6cc19c69e31fedc596a7 upstream. When health reporters are not supported, recovery function is invoked directly, not via devlink health reporters. In this direct flow, the recover function input parameter was passed incorrectly and is causing a kernel oops. This patch is fixing the input parameter. Following call trace is observed on rx error health reporting. Internal error: Oops: 96000007 [#1] PREEMPT SMP Process kworker/u16:4 (pid: 4584, stack limit = 0x00000000c9e45703) Call trace: mlx5e_rx_reporter_err_rq_cqe_recover+0x30/0x164 [mlx5_core] mlx5e_health_report+0x60/0x6c [mlx5_core] mlx5e_reporter_rq_cqe_err+0x6c/0x90 [mlx5_core] mlx5e_rq_err_cqe_work+0x20/0x2c [mlx5_core] process_one_work+0x168/0x3d0 worker_thread+0x58/0x3d0 kthread+0x108/0x134 Fixes: c50de4af1d63 ("net/mlx5e: Generalize tx reporter's functionality") Signed-off-by: Aya Levin Signed-off-by: Parav Pandit Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c @@ -200,7 +200,7 @@ int mlx5e_health_report(struct mlx5e_pri netdev_err(priv->netdev, err_str); if (!reporter) - return err_ctx->recover(&err_ctx->ctx); + return err_ctx->recover(err_ctx->ctx); return devlink_health_report(reporter, err_str, err_ctx); }