Search Linux Wireless

[PATCH] p54: Initialize extra_len in p54_tx_80211

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

 



When compiling with gcc-4.5 and CONFIG_DEBUG_SECTION_MISMATCH=y (which enables
-fno-inline-functions-called-once), p54_tx_80211_header will not be
inlined and extra_len will quickly
become corrupted because it uninitialized. The outgoing buffer fills
up before an attempt
to associate with a WPA access point can complete (it goes into an
associating 1, 2, 3, timed out
direct probe 1, 2, 3 timed out loop with wpa_supplicant and the driver
constantly returns ENOMEM).

I think this was previously hidden because in gcc-4.4, as well a
gcc-4.5 without
-fno-inline-functions-called-once, p54_tx_80211_header is always
inlined, which may have limited
the corruption.

It was suggested I submit this upstream by Stefan Bader to resolve LP: #722185

This patch is against 2.6.38.2

Signed-off-by: Jason Conti
---
--- a/drivers/net/wireless/p54/txrx.c	2011-04-06 18:05:01.951581773 -0400
+++ b/drivers/net/wireless/p54/txrx.c	2011-04-06 18:05:26.195581762 -0400
@@ -705,7 +705,7 @@ int p54_tx_80211(struct ieee80211_hw *de
 	struct p54_tx_info *p54info;
 	struct p54_hdr *hdr;
 	struct p54_tx_data *txhdr;
-	unsigned int padding, len, extra_len;
+	unsigned int padding, len, extra_len = 0;
 	int i, j, ridx;
 	u16 hdr_flags = 0, aid = 0;
 	u8 rate, queue = 0, crypt_offset = 0;
--
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