Search Linux Wireless

[patch 6/9] b43: debugfs tx_status, Fix endless loop inside of spinlock

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

 



This fixes an endless loop inside of a spinlock.
This triggers if the tx_status file is read before a packet
has been transmitted.

Signed-off-by: Michael Buesch <mb@xxxxxxxxx>

Index: wireless-dev-new/drivers/net/wireless/b43/debugfs.c
===================================================================
--- wireless-dev-new.orig/drivers/net/wireless/b43/debugfs.c	2007-08-12 16:38:51.000000000 +0200
+++ wireless-dev-new/drivers/net/wireless/b43/debugfs.c	2007-08-13 15:48:06.000000000 +0200
@@ -173,6 +173,10 @@ static ssize_t txstat_read_file(struct f
 		i = log->end + 1;
 		idx = 0;
 		while (1) {
+			if (log->end < 0) {
+				fappend("Nothing transmitted, yet\n");
+				break;
+			}
 			if (i == B43_NR_LOGGED_TXSTATUS)
 				i = 0;
 			stat = &(log->log[i]);

-- 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux