From patchwork Fri May 29 05:35:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6504271 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 353B99F1C1 for ; Fri, 29 May 2015 05:35:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DB982070D for ; Fri, 29 May 2015 05:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B85B32076A for ; Fri, 29 May 2015 05:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751460AbbE2Fff (ORCPT ); Fri, 29 May 2015 01:35:35 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:36807 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbbE2Ffc (ORCPT ); Fri, 29 May 2015 01:35:32 -0400 Received: by wivl4 with SMTP id l4so6446098wiv.1 for ; Thu, 28 May 2015 22:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=Y508+ELSiXDafIN6w0f4T+v+mVWMNlHakGljduPrIro=; b=mXYiMa9W4ivwDyx2pkrBwyp5pUZVlMiFlcXS4dy2Gw68OL4XV7KqHOBJA/ayXxiVi6 nIdJxIuR0EnoPFymPR4EBk6CmV06vKcPQZiUhXP6GAH2O2bcLKvNwQtdXqHL8qs+HkhB aR8OZSY4XniCzjXXkZfolTEWsPVyX1x66n2KE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Y508+ELSiXDafIN6w0f4T+v+mVWMNlHakGljduPrIro=; b=KHK+wSuscanxw/sRuIhtKFfau/y3GGeuGd+cnsIG4D/nld7VDjHB/N84ryEiYhYAPL +EOm2toSEL3+rjMcfHHTgOm8rNn+1wePQ8fQ0uXDA4cKER7rD90eKakfvniQXfP0Jvmm s3unFFfPzaIABwuj5NdrtuOrPj0ZRbQJz+CCT2Xg4o5Og7zyiLlk0qrIbbcB2eAibkcd nJQVmoD62YwYGwsIXLh25Iu5sydMP7oEKUpK4fvzuXXdMFqkRRciItz01MvHdp3fDqlJ Xsg+MzXTJXi8Ff2gT8MrX9VMzxzN65FlNRS/APzC04CtWz3XD6zpMAy6gwsB/a2Jdb5n oJFQ== X-Gm-Message-State: ALoCoQlS4k9nMIMf2AKM8rzL7esm4Lh8ldMd+vgSw1Ducd+y0ETB454aVN78YEfV0Hj+WigmDEYBJ1b9Ye9uW/mz3bglK+TI0SGxny2qWbpWMfIcBFL7vjR6mUgoAAHZq+ju0CrTWOeU X-Received: by 10.180.105.74 with SMTP id gk10mr2817483wib.29.1432877731781; Thu, 28 May 2015 22:35:31 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id df1sm1327596wib.12.2015.05.28.22.35.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 22:35:30 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCH] ath10k: fix possible ps sleep crash Date: Fri, 29 May 2015 07:35:24 +0200 Message-Id: <1432877724-8256-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If probing failed pci sleep timer could remain running and trigger after ath10k structures were freed causing invalid pointer dereference: BUG: unable to handle kernel paging request at ffffc90001c80004 IP: [] iowrite32+0x38/0x40 ... Call Trace: [] ? __ath10k_pci_sleep+0x48/0x60 [ath10k_pci] [] ath10k_pci_ps_timer+0x5e/0x80 [ath10k_pci] [] call_timer_fn+0x3e/0x120 [] ? ath10k_pci_wake+0x150/0x150 [ath10k_pci] [] run_timer_softirq+0x201/0x2e0 [] __do_softirq+0xaf/0x290 [] irq_exit+0x95/0xa0 [] smp_apic_timer_interrupt+0x46/0x60 [] apic_timer_interrupt+0x6e/0x80 Fixes: 77258d409ce4 ("ath10k: enable pci soc powersaving") Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 17a060e8efa2..f37de77811f6 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -2850,6 +2850,7 @@ err_free_pipes: ath10k_pci_free_pipes(ar); err_sleep: + ath10k_pci_sleep_sync(ar); ath10k_pci_release(ar); err_core_destroy: