linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: cfg80211: Fix return value in scan logic
@ 2023-07-19 14:51 Ilan Peer
  2023-07-19 18:00 ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Ilan Peer @ 2023-07-19 14:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ilan Peer

As cfg80211_parse_colocated_ap() is not expected to return a negative
value return 0 and not a negative value if cfg80211_calc_short_ssid()
fails.

This bug was introduced in commit c8cb5b854b40f
('nl80211/cfg80211: support 6 GHz scanning').

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 net/wireless/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 8bf00caf5d29..0cf1ce7b6934 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -657,7 +657,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies,
 
 	ret = cfg80211_calc_short_ssid(ies, &ssid_elem, &s_ssid_tmp);
 	if (ret)
-		return ret;
+		return 0;
 
 	for_each_element_id(elem, WLAN_EID_REDUCED_NEIGHBOR_REPORT,
 			    ies->data, ies->len) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] wifi: cfg80211: Fix return value in scan logic
  2023-07-19 14:51 [PATCH] wifi: cfg80211: Fix return value in scan logic Ilan Peer
@ 2023-07-19 18:00 ` Jakub Kicinski
  2023-07-19 18:04   ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2023-07-19 18:00 UTC (permalink / raw)
  To: Ilan Peer; +Cc: linux-wireless

On Wed, 19 Jul 2023 17:51:20 +0300 Ilan Peer wrote:
> As cfg80211_parse_colocated_ap() is not expected to return a negative
> value return 0 and not a negative value if cfg80211_calc_short_ssid()
> fails.

What's the user visible impact of this issue?

> This bug was introduced in commit c8cb5b854b40f
> ('nl80211/cfg80211: support 6 GHz scanning').

And if it does indeed have user-visible impact please use the formal
Fixes tag format.

> Signed-off-by: Ilan Peer <ilan.peer@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] wifi: cfg80211: Fix return value in scan logic
  2023-07-19 18:00 ` Jakub Kicinski
@ 2023-07-19 18:04   ` Jakub Kicinski
  2023-07-23 12:08     ` Peer, Ilan
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2023-07-19 18:04 UTC (permalink / raw)
  To: Ilan Peer; +Cc: linux-wireless

On Wed, 19 Jul 2023 11:00:18 -0700 Jakub Kicinski wrote:
> > This bug was introduced in commit c8cb5b854b40f
> > ('nl80211/cfg80211: support 6 GHz scanning').  
> 
> And if it does indeed have user-visible impact please use the formal
> Fixes tag format.

Oh yeah, it's from a user report on the list. You should definitely add
a Fixes tag, and Link: (possibly multiple if there were multiple) to
the report.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] wifi: cfg80211: Fix return value in scan logic
  2023-07-19 18:04   ` Jakub Kicinski
@ 2023-07-23 12:08     ` Peer, Ilan
  0 siblings, 0 replies; 4+ messages in thread
From: Peer, Ilan @ 2023-07-23 12:08 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: linux-wireless@vger.kernel.org

Hi,

> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Wednesday, July 19, 2023 21:05
> To: Peer, Ilan <ilan.peer@intel.com>
> Cc: linux-wireless@vger.kernel.org
> Subject: Re: [PATCH] wifi: cfg80211: Fix return value in scan logic
> 
> On Wed, 19 Jul 2023 11:00:18 -0700 Jakub Kicinski wrote:
> > > This bug was introduced in commit c8cb5b854b40f
> > > ('nl80211/cfg80211: support 6 GHz scanning').
> >
> > And if it does indeed have user-visible impact please use the formal
> > Fixes tag format.
> 
> Oh yeah, it's from a user report on the list. You should definitely add a Fixes
> tag, and Link: (possibly multiple if there were multiple) to the report.

Done. Thanks!

Ilan.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-23 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 14:51 [PATCH] wifi: cfg80211: Fix return value in scan logic Ilan Peer
2023-07-19 18:00 ` Jakub Kicinski
2023-07-19 18:04   ` Jakub Kicinski
2023-07-23 12:08     ` Peer, Ilan

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).