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: 6504281 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E192BC0020 for ; Fri, 29 May 2015 05:36:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F5702071B for ; Fri, 29 May 2015 05:36:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40AB12070D for ; Fri, 29 May 2015 05:36:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YyCxf-0006ZP-CY; Fri, 29 May 2015 05:36:03 +0000 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YyCxc-0006Y2-CY for ath10k@lists.infradead.org; Fri, 29 May 2015 05:36:01 +0000 Received: by wicmx19 with SMTP id mx19so6718497wic.0 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=a3UbVR9EVZMn62SiNUs1AqJwLMdo0XUpGG5i+SVrutMPkFZCaq39ANQ46g7lmmg5lO gnVnmbEagHsCXA9LjS4jwebKwBZQn5fYLhiMYX3gfJs+D8xDUxDTl/S5D/tnzEyFjQ1F i33G1iuyQ4jKW+J7QPV/JhpgYrCxMsmk6ZV/jI6MP3AA4qiQYoNeivn55axpLhBZYn9N zlxMCuh3hz/IAaKgcymWyTbQS3dGWyPrLwcMOOmbUh1k/HXq8uNSnOkMLR1QZi0pKXFJ jprRUwTLxevIXRUh+QT4reYXyVAxx3q59XhQ8xTyKwo+WcrYbRPuMatH4+9sToPxUwio LT+g== X-Gm-Message-State: ALoCoQkeMP/wz12PmhvsQz83Z0aLCseEf+l/0Xa6hoyPef2C2RcfuV/SbPUYqlmNb59WvV9xg++KQ23uox0T0kOh1cs3KxAUfc9MdEZ8dBHr9VFT/4ydWcsdZoynC3Nmjd/uQL00bDI7DbHo8DOxyQnpcfLfC4lNnwCA2nbnTaKI9zBCBRHpwjY8uXTjO3q2XjThstjnCmTP 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150528_223600_581153_B5515800 X-CRM114-Status: UNSURE ( 6.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, 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: