aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2011-04-07 21:09:57 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-02 09:19:33 -0700
commitc6fedb562695213645926348c9885dcc81324e4c (patch)
treed8b0629e6da9a43ba463057b55906f8c8dbf4582 /drivers/net/wireless
parent343b1a2525647d9035710c03042fe7e27b91a951 (diff)
downloadlinux-linaro-android-c6fedb562695213645926348c9885dcc81324e4c.tar.gz
p54: Initialize extra_len in p54_tx_80211
commit a6756da9eace8b4af73e9dea43f1fc2889224c94 upstream. This patch fixes a very serious off-by-one bug in the driver, which could leave the device in an unresponsive state. The problem was that the extra_len variable [used to reserve extra scratch buffer space for the firmware] was left uninitialized. Because p54_assign_address later needs the value to reserve additional space, the resulting frame could be to big for the small device's memory window and everything would immediately come to a grinding halt. Reference: https://bugs.launchpad.net/bugs/722185 Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Jason Conti <jason.conti@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/p54/txrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f618b9623e5..2cfdd3890bd 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -705,7 +705,7 @@ int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
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;