Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp595545ybl; Thu, 22 Aug 2019 01:46:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwGQZHCsvh4vikYb2PkqUSjIZOoMrRlWPsZbHVd/TgNzwl93nrNdUziDtYecWxc8s6Fzdi X-Received: by 2002:a63:fe15:: with SMTP id p21mr23778041pgh.149.1566463607654; Thu, 22 Aug 2019 01:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566463607; cv=none; d=google.com; s=arc-20160816; b=GZwiMITEH2FyrTq3t+utM4suj/LRN7XrZwYXmt8f2ib/UFOLlC+B+0Iu66B1aqKbaQ U763B5/f6umLX59s9QhBTovJujBZTdQSMWx9Yq8ncD3JQHwvbf5hQZ5wqocKZ0dKtxIg nagnMZgAey7C6bAXhH0vmWgbOdklBYDEQMgfNcOWigIxtVUZc869r1fUZuWLHGF0D2hb hQDlT+vy56FHi0+w78+5sl9oaG/zlJIXYR7FWzvhNW7XfjuXokbops8H48wbiNfcAd9P NnrIgTBG9qBg9kXPuHdmNSk1FNHGRHw3at97TFoQq0MoRn0mqdAKwrXGEZ6MoVHc5jfC 0DRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=VqjATVpTyEqs1ltrFyg6uxwkwpjsBGN9OkEqaHYMft8=; b=acmQgfadD4ZKHPNrdzfi3pKXTxdStGrMpjEivEr37thi2uUo9VHX0VX6hpEh92NdOr /WLgsyOVs3VmHtFVucg+0WrlDl1Sv5zBGxsX7pQkDb2fTR6g+p6aZNaPHG2rzSzT90zx SitgsNhChVv+Vd/Bh7Xpq3z5nBEHsASXGJZC4rhiTH5654QOAFtdRFnsCLbRstX1pGr4 aIkZRtc7/TkxBRdipCgUHwh+z5LYXdTfHPXReUq0XF4Zb/E16kjGcIyTmvVDEihq+7kn 6mGJyfbEBJN6FNEHDmjuCph649hr3yPALp8zX+1hPjMwlVrMDSUmKKpIBFzXfr4ZMCh4 2xbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Lvtw+OSd; 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 n2si16563987pga.426.2019.08.22.01.46.33; Thu, 22 Aug 2019 01:46:47 -0700 (PDT) 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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=Lvtw+OSd; 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 S1730693AbfHVHdH (ORCPT + 99 others); Thu, 22 Aug 2019 03:33:07 -0400 Received: from nbd.name ([46.4.11.11]:48308 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727401AbfHVHdH (ORCPT ); Thu, 22 Aug 2019 03:33:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VqjATVpTyEqs1ltrFyg6uxwkwpjsBGN9OkEqaHYMft8=; b=Lvtw+OSdjudHIAZS898qb4zeC2 7V8/0QmqxmkmGAeUv1kLsrBTLpMwuG8gt/Dhn43CXCDQkcGuNfmXHRXBjpWugUAbhh5LDCdctDD7m 7rNDSIQ/c7zeIyEa+3CipCoyI125XtfZXzu0BUyGXtcjD2QsnL+BvPHF55Ow8+nuZKSE=; Received: from p54ae9443.dip0.t-ipconnect.de ([84.174.148.67] helo=maeck.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0hak-0002gu-0Y for linux-wireless@vger.kernel.org; Thu, 22 Aug 2019 09:33:06 +0200 Received: by maeck.local (Postfix, from userid 501) id 7494663FD13C; Thu, 22 Aug 2019 09:33:05 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 2/2] mt76: stop rx aggregation on station removal Date: Thu, 22 Aug 2019 09:33:05 +0200 Message-Id: <20190822073305.37840-2-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190822073305.37840-1-nbd@nbd.name> References: <20190822073305.37840-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fixes use-after-free issues on forced station removal during hardware restart on MT76x02 Fixes: aee5b8cf2477 ("mt76: implement A-MPDU rx reordering in the driver code") Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index aeb535204c4d..32ddbf088817 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -708,6 +708,9 @@ void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif, rcu_assign_pointer(dev->wcid[idx], NULL); synchronize_rcu(); + for (i = 0; i < ARRAY_SIZE(wcid->aggr); i++) + mt76_rx_aggr_stop(dev, wcid, i); + if (dev->drv->sta_remove) dev->drv->sta_remove(dev, vif, sta); -- 2.17.0