From patchwork Thu Jan 11 18:35:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurence Oberman X-Patchwork-Id: 10158333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C810D60170 for ; Thu, 11 Jan 2018 18:35:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB94B28571 for ; Thu, 11 Jan 2018 18:35:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE8AF285FB; Thu, 11 Jan 2018 18:35:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5217928571 for ; Thu, 11 Jan 2018 18:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934803AbeAKSfy (ORCPT ); Thu, 11 Jan 2018 13:35:54 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:35477 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932215AbeAKSfx (ORCPT ); Thu, 11 Jan 2018 13:35:53 -0500 Received: by mail-qk0-f196.google.com with SMTP id w1so5560431qka.2 for ; Thu, 11 Jan 2018 10:35:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=pxxyI8qwT8vx/wEG7Zhx0ZshgSpcu7GL39JpDXKqxQ8=; b=aXBhY6vMVRxwzxMtaP0hls9TP5n6cnsZNTjcJ2yS6XG2ujshLA6KLko7e24PsOWuSP YeK+mmku6V615gT+6LSDXBFDb/SrxaU7MEp2Nwg4QDORPpKQd+ZPbnVsmPLNyvAaL2wK 7Dfn5opHGWE1pfUoGJbznlYMj9E9sfu0UJRv4ZHB22IiSKQKHiIUSk8jjQVCYsAlEvRs /KyGAtDCl50LUEDxfkdKBeHveeJKjBugmvgz32o3JOxtnOPO7BH/IIIOaVaNs4nhXfCx JB6/Mgkmzs+borTCZbsY8OZ+4AMOT0Ts+aboK1t0yPoV1qRYsZTjeEaXNcjQKj2QQLWu 1LoQ== X-Gm-Message-State: AKwxytfz+YDva/4F1jAnF57OhxsPMfphPuoSAo62vzTfZmElnB/5eWJC jsJAznlBdRaOUyFDcxN5OEMpAA== X-Google-Smtp-Source: ACJfBovE+thoDQ8EPMsTufUVctZ1IDfMdwri0Wtsh2vooJTcvyWqv/f/zPLfceCl5qBvbJvPIbaDSA== X-Received: by 10.233.223.71 with SMTP id t68mr1149671qkf.326.1515695752682; Thu, 11 Jan 2018 10:35:52 -0800 (PST) Received: from loberhel74 (71-88-101-235.dhcp.oxfr.ma.charter.com. [71.88.101.235]) by smtp.gmail.com with ESMTPSA id q15sm13035284qkj.31.2018.01.11.10.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 10:35:52 -0800 (PST) Message-ID: <1515695751.21421.5.camel@redhat.com> Subject: Patch: RDMA mlx5_core.c : mlx5_try_fast_unload causes panics From: Laurence Oberman To: Jason Gunthorpe Cc: Leon Romanovsky , Bart Van Assche , "linux-rdma@vger.kernel.org" , "ddutile@redhat.com" Date: Thu, 11 Jan 2018 13:35:51 -0500 In-Reply-To: <1515694855.21421.3.camel@redhat.com> References: <1515531652.26021.1.camel@redhat.com> <1515537614.26021.3.camel@redhat.com> <1515591723.26021.6.camel@redhat.com> <20180110182648.GI4518@ziepe.ca> <1515609623.2745.20.camel@wdc.com> <1515610750.10153.1.camel@redhat.com> <20180110191510.GK4518@ziepe.ca> <1515612639.10153.3.camel@redhat.com> <20180110205243.GP4776@mellanox.com> <1515618674.10153.6.camel@redhat.com> <20180110211501.GS4776@mellanox.com> <1515675741.21421.1.camel@redhat.com> <1515694855.21421.3.camel@redhat.com> X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Changes to the mlx5_core call mlx5_try_fast_unload in the shutdown. This is causing error messages on shutdown and with the latest rdma tree panics due to list corruption. Remove the mlx5_try_fast_unload call so we go back to calling the original mlx5_unload_one call only. Tested-by:     Laurence Oberman Signed-off-by: Laurence Oberman This patch was tested against the latest RDMA for-next tree --  1.8.3.1 Now on shutdown we are clean Rebooting. [  203.281646] kvm: exiting hardware virtualization [  203.309916] sd 2:0:0:1: [sdbk] Synchronizing SCSI cache .. .. [  204.240158] sd 1:0:0:2: [sdaf] Synchronizing SCSI cache [  204.269623] sd 1:0:0:3: [sdae] Synchronizing SCSI cache [  204.298736] sd 1:0:0:4: [sdad] Synchronizing SCSI cache .. .. [  205.074525] sd 1:0:0:0: [sdd] Synchronizing SCSI cache [  205.103639] mlx5_core 0000:08:00.1: Shutdown was called [  208.244242] mlx5_1:wait_for_async_commands:735:(pid 14464): done with all pending requests .. .. [  208.294459] sd 1:0:0:0: [sdd] Synchronizing SCSI cache [  208.329616] scsi 1:0:0:0: alua: Detached [  208.352899] sd 1:0:0:29: [sde] Synchronizing SCSI cache [  208.388955] scsi 1:0:0:29: alua: Detached .. .. [  212.230718] scsi host1: ib_srp: connection closed [  226.697119] mlx5_core 0000:08:00.0: Shutdown was called [  229.899254] mlx5_0:wait_for_async_commands:735:(pid 14464): done with all pending requests --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index d4a471a..1c66df6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1522,9 +1522,7 @@ static void shutdown(struct pci_dev *pdev)   int err;     dev_info(&pdev->dev, "Shutdown was called\n"); - err = mlx5_try_fast_unload(dev); - if (err) - mlx5_unload_one(dev, priv, false); + mlx5_unload_one(dev, priv, false);   mlx5_pci_disable_device(dev);  }