* [PATCH] rtlwifi: Fix non-canonical address access issues
@ 2020-10-27 3:16 WeitaoWangoc
2020-10-27 3:28 ` Pkshih
2020-11-07 15:50 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: WeitaoWangoc @ 2020-10-27 3:16 UTC (permalink / raw)
To: pkshih, kvalo, davem, kuba, linux-wireless, netdev, linux-kernel
Cc: tonywwang, weitaowang, CobeChen, TimGuo, wwt8723
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. So, 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtlwifi: Fix non-canonical address access issues
2020-10-27 3:16 [PATCH] rtlwifi: Fix non-canonical address access issues WeitaoWangoc
@ 2020-10-27 3:28 ` Pkshih
2020-11-07 15:50 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Pkshih @ 2020-10-27 3:28 UTC (permalink / raw)
To: linux-wireless, kvalo, davem, netdev, WeitaoWang-oc, linux-kernel, kuba
Cc: CobeChen, tonywwang, weitaowang, TimGuo, wwt8723
On Tue, 2020-10-27 at 11:16 +0800, WeitaoWangoc wrote:
> 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. So, 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>
Thanks for your patch.
Acked-by: Ping-Ke Shih <pkshih@realtek.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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtlwifi: Fix non-canonical address access issues
2020-10-27 3:16 [PATCH] rtlwifi: Fix non-canonical address access issues WeitaoWangoc
2020-10-27 3:28 ` Pkshih
@ 2020-11-07 15:50 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2020-11-07 15:50 UTC (permalink / raw)
To: WeitaoWangoc
Cc: pkshih, davem, kuba, linux-wireless, netdev, linux-kernel,
tonywwang, weitaowang, CobeChen, TimGuo, wwt8723
WeitaoWangoc <WeitaoWang-oc@zhaoxin.com> wrote:
> 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. So, 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>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Patch applied to wireless-drivers-next.git, thanks.
c521d7e0ff05 rtlwifi: Fix non-canonical address access issues
--
https://patchwork.kernel.org/project/linux-wireless/patch/1603768580-2798-1-git-send-email-WeitaoWang-oc@zhaoxin.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-07 15:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 3:16 [PATCH] rtlwifi: Fix non-canonical address access issues WeitaoWangoc
2020-10-27 3:28 ` Pkshih
2020-11-07 15:50 ` Kalle Valo
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).