* [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
@ 2024-11-06 15:46 Colin Ian King
2024-11-06 15:50 ` kernel test robot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Colin Ian King @ 2024-11-06 15:46 UTC (permalink / raw)
To: Ping-Ke Shih, Kalle Valo, Su Hui, linux-wireless
Cc: kernel-janitors, linux-kernel, stable
A previous clean-up fix removed the assignment of v2 inside a while loop
that turned it into an infinite loop. Fix this by restoring the assignment
of v2 from array[] so that v2 is updated inside the loop.
Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 1be51ea3f3c8..0d4d787e8be5 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -2033,8 +2033,10 @@ static bool _rtl8821ae_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
if (!_rtl8821ae_check_condition(hw, v1)) {
i += 2; /* skip the pair of expression*/
v2 = array[i+1];
- while (v2 != 0xDEAD)
+ while (v2 != 0xDEAD) {
i += 3;
+ v2 = array[i + 1];
+ }
}
}
}
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
2024-11-06 15:46 [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop Colin Ian King
@ 2024-11-06 15:50 ` kernel test robot
2024-11-07 0:51 ` Ping-Ke Shih
2024-11-18 1:48 ` Ping-Ke Shih
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-11-06 15:50 UTC (permalink / raw)
To: Colin Ian King; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: stable@vger.kernel.org" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
Link: https://lore.kernel.org/stable/20241106154642.1627886-1-colin.i.king%40gmail.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
2024-11-06 15:46 [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop Colin Ian King
2024-11-06 15:50 ` kernel test robot
@ 2024-11-07 0:51 ` Ping-Ke Shih
2024-11-07 1:14 ` Su Hui
2024-11-18 1:48 ` Ping-Ke Shih
2 siblings, 1 reply; 5+ messages in thread
From: Ping-Ke Shih @ 2024-11-07 0:51 UTC (permalink / raw)
To: Colin Ian King, Kalle Valo, Su Hui,
linux-wireless@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Colin Ian King <colin.i.king@gmail.com> wrote:
> A previous clean-up fix removed the assignment of v2 inside a while loop
> that turned it into an infinite loop. Fix this by restoring the assignment
> of v2 from array[] so that v2 is updated inside the loop.
>
> Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
I tested RTL8812AE/8821AE. Luckily, parsing current PHY register parameters
never falls into the check condition.
Tested-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> index 1be51ea3f3c8..0d4d787e8be5 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
> @@ -2033,8 +2033,10 @@ static bool _rtl8821ae_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
> if (!_rtl8821ae_check_condition(hw, v1)) {
> i += 2; /* skip the pair of expression*/
> v2 = array[i+1];
> - while (v2 != 0xDEAD)
> + while (v2 != 0xDEAD) {
> i += 3;
> + v2 = array[i + 1];
> + }
> }
> }
> }
> --
> 2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
2024-11-07 0:51 ` Ping-Ke Shih
@ 2024-11-07 1:14 ` Su Hui
0 siblings, 0 replies; 5+ messages in thread
From: Su Hui @ 2024-11-07 1:14 UTC (permalink / raw)
To: Ping-Ke Shih, Colin Ian King, Kalle Valo,
linux-wireless@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
On 2024/11/7 08:51, Ping-Ke Shih wrote:
> Colin Ian King <colin.i.king@gmail.com> wrote:
>> A previous clean-up fix removed the assignment of v2 inside a while loop
>> that turned it into an infinite loop. Fix this by restoring the assignment
>> of v2 from array[] so that v2 is updated inside the loop.
>>
>> Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code")
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Thanks for your correction. I'm sorry for this stupid mistake.
Reviewed-by: Su Hui <suhui@nfschina.com>
> I tested RTL8812AE/8821AE. Luckily, parsing current PHY register parameters
> never falls into the check condition.
>
> Tested-by: Ping-Ke Shih <pkshih@realtek.com>
>> ---
>> drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
>> b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
>> index 1be51ea3f3c8..0d4d787e8be5 100644
>> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
>> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
>> @@ -2033,8 +2033,10 @@ static bool _rtl8821ae_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
>> if (!_rtl8821ae_check_condition(hw, v1)) {
>> i += 2; /* skip the pair of expression*/
>> v2 = array[i+1];
>> - while (v2 != 0xDEAD)
>> + while (v2 != 0xDEAD) {
>> i += 3;
>> + v2 = array[i + 1];
>> + }
>> }
>> }
>> }
>> --
>> 2.39.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
2024-11-06 15:46 [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop Colin Ian King
2024-11-06 15:50 ` kernel test robot
2024-11-07 0:51 ` Ping-Ke Shih
@ 2024-11-18 1:48 ` Ping-Ke Shih
2 siblings, 0 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2024-11-18 1:48 UTC (permalink / raw)
To: Colin Ian King, Ping-Ke Shih, Kalle Valo, Su Hui, linux-wireless
Cc: kernel-janitors, linux-kernel, stable
Colin Ian King <colin.i.king@gmail.com> wrote:
> A previous clean-up fix removed the assignment of v2 inside a while loop
> that turned it into an infinite loop. Fix this by restoring the assignment
> of v2 from array[] so that v2 is updated inside the loop.
>
> Fixes: cda37445718d ("wifi: rtlwifi: rtl8821ae: phy: remove some useless code")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> Tested-by: Ping-Ke Shih <pkshih@realtek.com>
> Reviewed-by: Su Hui <suhui@nfschina.com>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
5e5903a442bb wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop
---
https://github.com/pkshih/rtw.git
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-18 1:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 15:46 [PATCH] wifi: rtlwifi: rtl8821ae: phy: restore removed code to fix infinite loop Colin Ian King
2024-11-06 15:50 ` kernel test robot
2024-11-07 0:51 ` Ping-Ke Shih
2024-11-07 1:14 ` Su Hui
2024-11-18 1:48 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox