staging: rtl8712: fix wrong function output
Subsystems (2)
PATCH 1/1 staging: rtl8712: fix wrong function output
Function r8712_find_network() were returning wlan_network even if it didn't match required address. This happened due to not checking if list end was reached and returning last processed wlan_network.
--- drivers/staging/rtl8712/rtl871x_mlme.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/rtl8712/rtl871x_mlme.c +2 -0
@@ -146,6 +146,8 @@ static struct wlan_network *r8712_find_network(struct __queue *scanned_queue,if (!memcmp (addr, pnetwork->network.MacAddress,ETH_ALEN ))break ; } +if (plist == phead) + pnetwork =NULL ;spin_unlock_irqrestore (&scanned_queue->lock, irqL);return pnetwork; }
Signature · 1 line
2.25.1
Greg KH
maintainerQuoted 8 lines · Sergei Krainov
Function
r8712_find_network()were returningwlan_networkeven if it didn't match required address. This happened due to not checking if list end was reached and returning last processedwlan_network.Signed-off-by Sergei Krainov <[email protected]>--- drivers/staging/rtl8712/rtl871x_mlme.c | 2 ++ 1 file changed, 2 insertions(+)
What commit does this "fix"? Or has this bug been there always?
thanks,
greg k-h
Quoted 10 lines · Greg KH
Quoted 8 lines · Sergei Krainov
Function
r8712_find_network()were returningwlan_networkeven if it didn't match required address. This happened due to not checking if list end was reached and returning last processedwlan_network.Signed-off-by Sergei Krainov <[email protected]>--- drivers/staging/rtl8712/rtl871x_mlme.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 5 lines
What commit does this "fix"? Or has this bug been there always?
thanks,
greg k-h
This commit fixes the bug mentioned.
And this commit is based on staging-next and has nothing to do with my previous patches, for which I'm sorry, I was wrong.
Thanks a lot for review and your time,
Sergei
Greg KH
maintainerQuoted 11 lines · Sergei Krainov
Quoted 10 lines · Greg KH
Quoted 8 lines · Sergei Krainov
Function
r8712_find_network()were returningwlan_networkeven if it didn't match required address. This happened due to not checking if list end was reached and returning last processedwlan_network.Signed-off-by Sergei Krainov <[email protected]>--- drivers/staging/rtl8712/rtl871x_mlme.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 7 lines
Quoted 5 lines
What commit does this "fix"? Or has this bug been there always?
thanks,
greg k-h
This commit fixes the bug mentioned.
What bug mentioned?
Quoted 2 lines
And this commit is based on staging-next and has nothing to do with my previous patches, for which I'm sorry, I was wrong.
I do not understand at all, sorry.
Please resend with a "Fixes:" tag that shows the commit that this fixes.
thanks,
greg k-h