From patchwork Mon Jun 11 21:09:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10458851 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 0CBD66020F for ; Mon, 11 Jun 2018 21:10:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8C632859A for ; Mon, 11 Jun 2018 21:10:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD7A7285CB; Mon, 11 Jun 2018 21:10:32 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E3E32859A for ; Mon, 11 Jun 2018 21:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=axXk9Hy8yvMOnTCB1bzThuYoTGpTpLlBaaYcSxGbqiE=; b=Rz9 Zv4T/4prCUnR4zTOqIpy18yB7uH2uIvHi5krKxOKorNRHHRqMz4qMqHB5kHkiait6jQqjZbuITSWK /zwO+S81W0ioFaQnvX+qxyScOUjnEdpSQPQJuoVYh4pCUvla9CGwuztHp4+l160avseyJa/VLRAZ3 XAHMLczDGQb3wqX5NZ9r+ydu2x0Vzuomve3i1CPi1ezAJzv2VofEljmsZMI2YQYwXWfHBIbPLA2/e 45mFVIn8dmCwMn5HEDDlp7J3ijMLd1JxqQB5IgMAK89cpp23958Kk7cCz0S01YQRrbmuBxPWuqnmn 4XbApNpvyk2v1nddljdq1gskVnGXx4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSU51-0007kD-W1; Mon, 11 Jun 2018 21:10:24 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSU4o-0006rN-Jw for ath10k@lists.infradead.org; Mon, 11 Jun 2018 21:10:15 +0000 Received: by mail-pl0-x241.google.com with SMTP id b14-v6so13044458pls.5 for ; Mon, 11 Jun 2018 14:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=27owysnX14HEcDVIWfr1qFoh0CBLmYb3+9NO+C2BgoU=; b=KzkYGh54E9JoTqD3jvrOfCcgRI3yP3UaJ2jlYsNgblqq/IC167fGalTUaLqI0rS/Np QVhMuiSYn0xfzuTz+iFVyCWQs1jlEFfqoiupHW46ESYSIxchB4HTTaBks0/+l6dLrxpw OUmNGsZJp3feyujF+cjG4GhpRb+Iit4oiGgnA= 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=27owysnX14HEcDVIWfr1qFoh0CBLmYb3+9NO+C2BgoU=; b=O/g4aOlV+Xto85QRSTPlmjn3/34k3d/JDKArl8C41H3b4x4cOk9H+isgthmZ1DrXY/ CsZzRjYwMT4jDN73bqB+V668cwE1la3kJq/Wt4bHaWDtg/lpYIlGm6CE2zVuGDG5g08i SUs62V6AaYq6ouE1BIiJeWMc2GyFsakNeu0f8K4jLoSc95IMgXgti8C106RNVIaakM0o enZIw31Wt9G/xEHkfYvgMM2OLBAHk1bbj5/eBGyeVLNBXYiVo58baYkqaoD9zUdpWPgJ e7A84FESyPC/dXvma2+gjX0x7jIZhHKYjB1FeFv5xDuqcNxFoDjYaYg4nOlL/UTjZjYb Jehw== X-Gm-Message-State: APt69E1FFsc46bT2IhKZuSgtX9NJzs9GqdtIHbXwXa0nNcCTszVz8ShG GRHEaR2W8rUORx+1RdsUNdTzzw== X-Google-Smtp-Source: ADUXVKIJHWB4qXfITSZ6UB8yuF79x0rbO2pXHIzKzhe+KRrvApOJY5C8hkHcxMXH+oqnOrp7bUhVRw== X-Received: by 2002:a17:902:76c4:: with SMTP id j4-v6mr792401plt.19.1528751399771; Mon, 11 Jun 2018 14:09:59 -0700 (PDT) Received: from ban.mtv.corp.google.com ([2620:0:1000:1501:bc2f:3082:9938:5d41]) by smtp.gmail.com with ESMTPSA id c4-v6sm49116184pfe.53.2018.06.11.14.09.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 14:09:58 -0700 (PDT) From: Brian Norris To: Kalle Valo Subject: [PATCH 1/4] ath10k: snoc: use correct bus-specific pointer in RX retry Date: Mon, 11 Jun 2018 14:09:43 -0700 Message-Id: <20180611210946.241341-1-briannorris@chromium.org> X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a-goog X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180611_141010_682926_5E5E7743 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Brian Norris , Govind Singh , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We're 'ath10k_snoc', not 'ath10k_pci'. This probably means we're accessing junk data in ath10k_snoc_rx_replenish_retry(), unless 'ath10k_snoc' and 'ath10k_pci' happen to have very similar struct layouts. Noticed by inspection. Fixes: d915105231ca ("ath10k: add hif rx methods for wcn3990") Signed-off-by: Brian Norris --- It's possible this would be a for-4.18 target, since the buggy patch is in the -rc1 merge. But this driver is not fully operational yet. Also, I'm sending some companion refactorings to help avoid this bug. They probably aren't 4.18 material. Let me know if I should do anything differently. drivers/net/wireless/ath/ath10k/snoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index ee74e0060504..c7cfc9c9b3d7 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -449,7 +449,7 @@ static void ath10k_snoc_htt_rx_cb(struct ath10k_ce_pipe *ce_state) static void ath10k_snoc_rx_replenish_retry(struct timer_list *t) { - struct ath10k_pci *ar_snoc = from_timer(ar_snoc, t, rx_post_retry); + struct ath10k_snoc *ar_snoc = from_timer(ar_snoc, t, rx_post_retry); struct ath10k *ar = ar_snoc->ar; ath10k_snoc_rx_post(ar);