Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1791891ybc; Wed, 20 Nov 2019 04:15:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyS+/Fx2vozlNEFkZK/OShRM8rquw0XTjPF2Rsp13mEaOqg7cJyXHhzZNvDeHv66Ow+sodj X-Received: by 2002:a17:906:5211:: with SMTP id g17mr5203932ejm.60.1574252143572; Wed, 20 Nov 2019 04:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574252143; cv=none; d=google.com; s=arc-20160816; b=K98sxtPTkyXLXA8rzwbqjAjS5314mripCz//mnJu9maLliVk1txrjaGTvwXjN8He36 FhTWDU7+Ca8RD1fpgvI78Ba3KCdNIjyNk1wn40fxkeK/cfI98n/DcWhPwe9RtEOpHyAJ 1NGnoT5NbWCJVu5Gi3kYt4kI0kfsZZovH80OwN1NgjfAZ/W5zOLUZZvrijJQqPFbunQN EOLdrwFUCK+H0FsKqhzpQfmBBNgAbfoZML4BCIC5lWW+I/9YP9TXbLIdESgCluLLz8AG AfbioVF1wcF+Ob6igla3pf729GxKjqSoWRvAlzKj78snJA2n4dy1etuSP1FH72XfkNIF GVBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:to:subject; bh=dFDrC34AcVCg/5gUZAnA/5X5jnya7y5A5OZIvl6lDG0=; b=GTnlQ1PENf+OTQM9ieKFmwjlbdAXTZuEcRXvS33bcQFvAZX4WxAJq1IprnGNFsPcTj 8137vPiIBAxydOPvrq89QQRwd4g2SVVPZ88qDWbCP1mhs+7XFVgzartYs5JA8RMVWup5 2YU/ZV6/i0FwgsMbE/VSDyBN4y6T5T4AYtFQBDsU3Prkpmw0YDNaDqf3yf7c3d5l9WTt M/6lVizkbVLFo6gFHec39+AMxIlIZPz5gkMeRWhUVwvvtsBRCHgB0PTX9nwSOU96CBYW CN6XdDhfLxpdW4pg+nG4MGUvLax1i4CY/gyxaLN92vp1TGfDe3f40KwIImpjxP1OwYDf s8HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qn4si16170298ejb.329.2019.11.20.04.15.18; Wed, 20 Nov 2019 04:15:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728732AbfKTL7Z (ORCPT + 99 others); Wed, 20 Nov 2019 06:59:25 -0500 Received: from smail.rz.tu-ilmenau.de ([141.24.186.67]:47366 "EHLO smail.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727590AbfKTL7Z (ORCPT ); Wed, 20 Nov 2019 06:59:25 -0500 Received: from [192.168.2.97] (unknown [141.24.207.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id 7EC9F58007B; Wed, 20 Nov 2019 12:59:23 +0100 (CET) Subject: Re: [PATCH] mt76: use rcu_read_lock_bh in mt76_dma_rx_poll To: Felix Fietkau , linux-wireless@vger.kernel.org References: <20191120114647.88967-1-nbd@nbd.name> From: Markus Theil Autocrypt: addr=markus.theil@tu-ilmenau.de; keydata= mQINBFcopAYBEADBcwd5L8+T0zgqq4kYY4nQt6CYh5sOalHdI3zNE6fWbRbzQwViIlC9Q0q/ ys+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+tSpH8v3n+3I2AKoMAEQEA AYkCJQQYAQoADwUCVyikBgIbDAUJB4YfgAAKCRBt3CLaT/oEE7lZEACgrOxRaCQ7D5Rc4BOA N4VDIQqVch8X3pBE/k/v3UopkgmYnP4RlhegWr4wp2E6Vuyt8nwnZs3WhxQENfMjd5rV3WhG k5ib+pmLvtAht5j8jfP5+UKUTvX1a6oMi98PT8PuQ70oKM7T/KN+RpXIHoz/2Dgde1RQpwKC XWtkU9tBF87fE8FfwuqS6myOfd8zc6fOVV/fxmTXVC8qA7tB+0tOSDHB80GRYwnlumChOtOB Np8ABFWryE2e6mZZnp9Tpd1A74B45z6l445f5BixGLExAOoTJNA2k0JWx79/2Yi+pwTnQMzW QBLa48MnL3DUlVlahz1FZfGbA2U5NARS8iRdUhCaHL0Lph8HxWJwYA5w2afyCCwRD7xFo44V jsCNbqtZ6TrFARJdrbeWQl3RZ4Y+uuvN9mgvttVenAbx5d68IariYtXashucQeIMoqIloHTN sJDaupNm6+A9T3Re5yXmZsrWSxEEEGv1Bh+5DH6vauP0Ng0ebZ4c6jXfgLpPnAUWlV0rnmrJ q9141nbyLRYAhUXxiqajb+Zocp2Am4BF19rBUa1C78ooye9XShhuQvDTB6tZuiYWc24tiyqb IjR1hmG/zg8APhURAv/zUubaf4IA7v5YHVQqAbpUfb6ePlPVJBtVw2CwXFrGwnqDFh82La8D sGZPq8zmOtvOyZtafA== Message-ID: <00ba1886-188f-f8f8-07f1-61a89bbdd768@tu-ilmenau.de> Date: Wed, 20 Nov 2019 12:59:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191120114647.88967-1-nbd@nbd.name> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 11/20/19 12:46 PM, Felix Fietkau wrote: > Fixes potential RCU issues and avoids calling ieee80211_rx_napi with softirq > enabled. > > Reported-by: Markus Theil > Signed-off-by: Felix Fietkau > --- > drivers/net/wireless/mediatek/mt76/dma.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c > index 6173c80189ba..ed0ee2d4a452 100644 > --- a/drivers/net/wireless/mediatek/mt76/dma.c > +++ b/drivers/net/wireless/mediatek/mt76/dma.c > @@ -528,7 +528,7 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget) > dev = container_of(napi->dev, struct mt76_dev, napi_dev); > qid = napi - dev->napi; > > - rcu_read_lock(); > + rcu_read_lock_bh(); > > do { > cur = mt76_dma_rx_process(dev, &dev->q_rx[qid], budget - done); > @@ -536,7 +536,7 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget) > done += cur; > } while (cur && done < budget); > > - rcu_read_unlock(); > + rcu_read_unlock_bh(); > > if (done < budget && napi_complete(napi)) > dev->drv->rx_poll_complete(dev, qid); This patch is incomplete. The same problem exists for usb. I'll send a fix for that. Regards, Markus