* [PATCH] staging: rtl8712: fix wrong function output
@ 2021-04-08 23:45 Sergei Krainov
2021-04-09 6:33 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Krainov @ 2021-04-08 23:45 UTC (permalink / raw)
To: Larry.Finger, florian.c.schilhabel, gregkh
Cc: linux-staging, linux-kernel, kernel-janitors
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.
Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com>
---
drivers/staging/rtl8712/rtl871x_mlme.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index 8a97307fbbd6..c38161114b80 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8712: fix wrong function output
2021-04-08 23:45 [PATCH] staging: rtl8712: fix wrong function output Sergei Krainov
@ 2021-04-09 6:33 ` Greg KH
2021-04-09 11:41 ` Sergei Krainov
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-04-09 6:33 UTC (permalink / raw)
To: Sergei Krainov
Cc: Larry.Finger, florian.c.schilhabel, linux-staging, linux-kernel,
kernel-janitors
On Fri, Apr 09, 2021 at 01:45:27AM +0200, Sergei Krainov wrote:
> 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.
>
> Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8712: fix wrong function output
2021-04-09 6:33 ` Greg KH
@ 2021-04-09 11:41 ` Sergei Krainov
2021-04-09 12:03 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Krainov @ 2021-04-09 11:41 UTC (permalink / raw)
To: Greg KH
Cc: Larry.Finger, florian.c.schilhabel, linux-staging, linux-kernel,
kernel-janitors
On Fri, Apr 09, 2021 at 08:33:23AM +0200, Greg KH wrote:
> On Fri, Apr 09, 2021 at 01:45:27AM +0200, Sergei Krainov wrote:
> > 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.
> >
> > Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com>
> > ---
> > 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
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8712: fix wrong function output
2021-04-09 11:41 ` Sergei Krainov
@ 2021-04-09 12:03 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-04-09 12:03 UTC (permalink / raw)
To: Sergei Krainov
Cc: Larry.Finger, florian.c.schilhabel, linux-staging, linux-kernel,
kernel-janitors
On Fri, Apr 09, 2021 at 01:41:59PM +0200, Sergei Krainov wrote:
> On Fri, Apr 09, 2021 at 08:33:23AM +0200, Greg KH wrote:
> > On Fri, Apr 09, 2021 at 01:45:27AM +0200, Sergei Krainov wrote:
> > > 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.
> > >
> > > Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com>
> > > ---
> > > 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
>
> This commit fixes the bug mentioned.
What 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.
I do not understand at all, sorry.
Please resend with a "Fixes:" tag that shows the commit that this fixes.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-09 12:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 23:45 [PATCH] staging: rtl8712: fix wrong function output Sergei Krainov
2021-04-09 6:33 ` Greg KH
2021-04-09 11:41 ` Sergei Krainov
2021-04-09 12:03 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.