Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3948472pxu; Tue, 20 Oct 2020 04:57:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX36vJ+nlhrkffsxWGp4l+xjmHtiUNvquupd1hggT40eHTcqMU+mQEU/kGleKyYJdyIQmd X-Received: by 2002:a05:6402:1716:: with SMTP id y22mr2287083edu.241.1603195079069; Tue, 20 Oct 2020 04:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603195079; cv=none; d=google.com; s=arc-20160816; b=JwgC5S9vjkR6DicbPX/JwNcjHVCLwS/EH3LQBRi0aVAx1YiM9+oeHv/nafB8qqnT4A dxpIGsDVRttVJwXArHojyY6ksdgJfypoMNGylopCaevcVEMnMs3ld8OPOKXgsMoWSbY8 2NsyxQ/hW8IUNJRO6OqhaJ4Q5qiU1zAac8JBrjl1aoJvaiOjG0ANlfHyuE9BxjDLvkOf Z7ECX/CyBorpDR2B6GmBezE76iZUkkeEtFE7pIxUXetp0ts7Y4HIDkYfVtjOsBZazhIg l5FOiaIf0l/CtvpBB+VGIOyTs+DR1hCwtuGf2k1IZKgTF4a0oyinpT8RKLsO1M+C9Rq+ XLUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=pCn5dyx5PPhITnjdoOdE9+HYJq6eFMnLEh85VL8MAVA=; b=Iq1tXsRdPLdGURZ4458tkrjiV81YX3Lnl93zgYWA2s+YUnFT78Vt9m8KQH1dx8jxHI 699wXePc6JlA/pSiES7EcXL6oKd8awlL2ANUYE9ddS+CMBxwNbP69hBf0fIoqKBSycCG Gnb78j35Mi3C4dYf8n2Ucgvmp+eyTyiOJRDr4RAnbSVNyiUpv9gYwochVDwqEBMhQgP6 PDZeGSR7fgcsd2GitE36FV4oEwFBVge9w3bcosh4iGz4Yfo/YuqoTwq1uJKvW2V2mGSF wnXK3PQOKXr9drcAibKjoguqmgdV2yKC5fUBdyFmaquv5GrkObij/vNHTp828fwmoZaO bZ9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si1144433ejr.323.2020.10.20.04.57.23; Tue, 20 Oct 2020 04:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393849AbgJTLyL (ORCPT + 99 others); Tue, 20 Oct 2020 07:54:11 -0400 Received: from ZXSHCAS2.zhaoxin.com ([203.148.12.82]:60142 "EHLO ZXSHCAS2.zhaoxin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393793AbgJTLyK (ORCPT ); Tue, 20 Oct 2020 07:54:10 -0400 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Oct 2020 07:54:09 EDT Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS2.zhaoxin.com (10.28.252.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 20 Oct 2020 19:39:04 +0800 Received: from localhost.localdomain (61.148.243.73) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 20 Oct 2020 19:39:02 +0800 From: WeitaoWangoc To: , , , , , , CC: , , , , Subject: [PATCH] Net/Usb:Fix realtek wireless NIC non-canonical address access issues Date: Tue, 20 Oct 2020 19:38:59 +0800 Message-ID: <1603193939-3458-1-git-send-email-WeitaoWang-oc@zhaoxin.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [61.148.243.73] X-ClientProxiedBy: ZXSHCAS2.zhaoxin.com (10.28.252.162) To zxbjmbx1.zhaoxin.com (10.29.252.163) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org During realtek USB wireless NIC initialization, it's unexpected disconnection will cause urb sumbmit fail.On the one hand, _rtl_usb_cleanup_rx will be called to clean up rx stuff, especially for rtl_wq. On the other hand, disconnection will cause rtl_usb_disconnect and _rtl_usb_cleanup_rx to be called.Finnally,rtl_wq will be flush/destroy twice,which will cause non-canonical address 0xdead000000000122 access and general protection fault. Fixed this issue by remove _rtl_usb_cleanup_rx when urb sumbmit fail. Signed-off-by: WeitaoWangoc --- drivers/net/wireless/realtek/rtlwifi/usb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 06e073d..d62b87f 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -731,7 +731,6 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw) err_out: usb_kill_anchored_urbs(&rtlusb->rx_submitted); - _rtl_usb_cleanup_rx(hw); return err; } -- 2.7.4