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: 10458863 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 D774B60532 for ; Mon, 11 Jun 2018 21:11:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C081C2859A for ; Mon, 11 Jun 2018 21:11:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B56C3285B9; Mon, 11 Jun 2018 21:11: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 79165285D4 for ; Mon, 11 Jun 2018 21:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753970AbeFKVKB (ORCPT ); Mon, 11 Jun 2018 17:10:01 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:35827 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752830AbeFKVKA (ORCPT ); Mon, 11 Jun 2018 17:10:00 -0400 Received: by mail-pl0-f67.google.com with SMTP id k1-v6so4624611plt.2 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=VoU226cjcz9QCX7bq8npzDSzzJCJj2JswvBS051YRJxhJOBdva9sMRTalva4Yl5qKy q2elYscFQd1DKSK6Ui9M8W5Dp67JtWRMMvFOa+0ygNy03IS3KAcpNz63UU76kfWFD0+W cnFUihGqereggyU3EX4MRxH8i2nn7LIg5ZgiEhnIHOAH0cm3OaBPDVXH7iQb02nG7pUO 2IBBEqdOuC7vYsdX1fcu5XfX9rP5MEyXhigxQMsKlnH5PGBa2VBn8C2GhgvviZ0iLuM0 lIktNyjBqHvvtMXq07Bu5BHHUCftc++5tQB/f7U/nM+H8M7UJdkMHuIowiqO5iq/CoTp 0lsw== X-Gm-Message-State: APt69E3Idx+ItEGrHQzXiYqi3Z9L+GDYOkyJg4EAQhP5Fur5DRTXvX1k X04UY/J4QoU9geV1OWKGQ+3dXGJt0aA= 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 Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, Govind Singh , , Brian Norris 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 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 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);