Search Linux Wireless

Re: Possible bug in cfg80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/10/22 15:29, Maxim Klimenko Sergievich wrote:

Maxim,

I was able to duplicate your logged warnings by loading cfg80211 with the option "bss_entries_limit=1". The attached patch fixes the problem for me. Could you please test on your system?

If it is OK for you, I will submit it to wireless-drivers-next with you noted as the reporter and tester.

Thanks,

Larry
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index b888522f133b..d5f6fb5e107c 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -474,7 +474,9 @@ static bool cfg80211_bss_expire_oldest(struct cfg80211_registered_device *rdev)
 		oldest = bss;
 	}
 
-	if (WARN_ON(!oldest))
+	if (rdev->bss_entries == 1)
+		return false;
+	if (WARN_ON_ONCE(!oldest))
 		return false;
 
 	/*

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux