From patchwork Fri Jan 12 21:08:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10161659 X-Patchwork-Delegate: kvalo@adurom.com 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 2E385605BD for ; Fri, 12 Jan 2018 21:09:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F9E628A18 for ; Fri, 12 Jan 2018 21:09:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12A9A28AA1; Fri, 12 Jan 2018 21:09:05 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable 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 082B028A18 for ; Fri, 12 Jan 2018 21:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965310AbeALVIs (ORCPT ); Fri, 12 Jan 2018 16:08:48 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:42302 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965244AbeALVIo (ORCPT ); Fri, 12 Jan 2018 16:08:44 -0500 Received: by mail-pf0-f195.google.com with SMTP id d23so5285036pfe.9 for ; Fri, 12 Jan 2018 13:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=uk21e1jPOK3UgD1rYGwfqjDYHxrvmItja2586alw4SU=; b=IV80U3TxDbH9qDzho8EXxOhYmulx1P2kzAgDRuapltLWL5XXzlkjN4OVjKN0dwDk3l fZz9y/Gsyc1bB4EnvLvJvloPov0U6rjcAaKsREfDal1VbZoZuIp3LhVvZkvImwRgGVWo spH2XU+vTelxuvG9FepwHny/BJWjQ1tE+E94I= 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; bh=uk21e1jPOK3UgD1rYGwfqjDYHxrvmItja2586alw4SU=; b=qJr5yd9TxiudR+KRii3VxKpYXliZOyeKbTryNuQlyF9V9tt/9iLt8HqNQ+PAiSLtv2 KfNZ9k6ZNPIt1tBadFCgbvwWwGwX2FpOdAGtT5ZbAh5rjgHL/3I2O11JaQ8vvq5wbZid DdJmUHt2Fgc39QyCJeiPlKQTaE0ZjUNpCU6cZ8RbELkU5wcM6cl9gvlbnMxuHHlntOMC jVM81Zj6Wuu7IoS+P6kz+9IMUYVKQVx0YUXLDHlDKrhkxeEe5PpCNDkOxu6SdpFB6S4N QPanquQk886i41EssbpnKtI7fW5+ar1O1Fv1fAtXYJeQ4hN1Ho4eYE8lbpp3C0BgNyvL tDWw== X-Gm-Message-State: AKwxytdmrr5Cxy2zhhxgPalSDA9xCl9WzonG0rkVVICt8H6GNmtuUd6W 69DOYR8jDuM4f35049gavQhOeA== X-Google-Smtp-Source: ACJfBourPBAxUhG+XV2QKN1xVuV9ZsUb/dVOmOmYKwO3ALErvEyW8+6MdaleLHHTgzp9jKGoDq76IQ== X-Received: by 10.99.115.4 with SMTP id o4mr5671920pgc.206.1515791323451; Fri, 12 Jan 2018 13:08:43 -0800 (PST) Received: from ban.mtv.corp.google.com ([172.22.113.17]) by smtp.gmail.com with ESMTPSA id o7sm15217313pgp.18.2018.01.12.13.08.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 13:08:42 -0800 (PST) From: Brian Norris To: Ganapathi Bhat , Nishant Sarmukadam , Kalle Valo , Amitkumar Karwar Cc: , linux-wireless@vger.kernel.org, Ellie Reeves , Christoph Hellwig , Dmitry Torokhov , Zhiyuan Yang , Tim Song , Cathy Luo , James Cao , Brian Norris , "Signed-off-by : Xinming Hu" Subject: [PATCH 1/2] Revert "mwifiex: cancel pcie/sdio work in remove/shutdown handler" Date: Fri, 12 Jan 2018 13:08:36 -0800 Message-Id: <20180112210837.112628-1-briannorris@chromium.org> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit b713bbf1471b56b572ce26bd02b81a85c2b007f4. The "fix" in question does not actually fix all related problems, and it also introduces new deadlock possibilities. Since commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()"), the race in question is actually resolved (PCIe reset cannot happen at the same time as remove()). Instead, this "fix" just introduces a deadlock where mwifiex_pcie_card_reset_work() is waiting on device_lock, which is held by PCIe device remove(), which is waiting on...mwifiex_pcie_card_reset_work(). The proper thing to do is just to fix the deadlock. Patch for this will come separately. Cc: Signed-off-by: Xinming Hu Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/pcie.c | 2 -- drivers/net/wireless/marvell/mwifiex/sdio.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 23209c5cab05..f666cb2ea7e0 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -310,8 +310,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev) mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN); } - cancel_work_sync(&card->work); - mwifiex_remove_card(adapter); } diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 248858723753..a82880132af4 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -399,8 +399,6 @@ mwifiex_sdio_remove(struct sdio_func *func) mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN); } - cancel_work_sync(&card->work); - mwifiex_remove_card(adapter); }