linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: WeitaoWangoc <WeitaoWang-oc@zhaoxin.com>
To: <pkshih@realtek.com>, <kvalo@codeaurora.org>,
	<davem@davemloft.net>, <kuba@kernel.org>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <tonywwang@zhaoxin.com>, <weitaowang@zhaoxin.com>,
	<CobeChen@zhaoxin.com>, <TimGuo@zhaoxin.com>, <wwt8723@163.com>
Subject: [PATCH] Net/Usb:Fix realtek wireless NIC non-canonical address access issues
Date: Tue, 20 Oct 2020 19:38:59 +0800	[thread overview]
Message-ID: <1603193939-3458-1-git-send-email-WeitaoWang-oc@zhaoxin.com> (raw)

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 <WeitaoWang-oc@zhaoxin.com>
---
 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


             reply	other threads:[~2020-10-20 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 11:38 WeitaoWangoc [this message]
2020-10-27  1:48 ` [PATCH] Net/Usb:Fix realtek wireless NIC non-canonical address access issues Pkshih
2020-10-27  2:23   ` 答复: " WeitaoWang-oc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1603193939-3458-1-git-send-email-WeitaoWang-oc@zhaoxin.com \
    --to=weitaowang-oc@zhaoxin.com \
    --cc=CobeChen@zhaoxin.com \
    --cc=TimGuo@zhaoxin.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=tonywwang@zhaoxin.com \
    --cc=weitaowang@zhaoxin.com \
    --cc=wwt8723@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).