summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2012-05-10 12:14:00 +0300
committerLuciano Coelho <coelho@ti.com>2012-06-05 15:57:32 +0300
commit4f64a1e93f4749ea2ecacb7e93485ef9607b4e48 (patch)
tree8a4dc1415ef32dc09336b5514181e2fd019a4226 /drivers/net/wireless/ti
parent4b9d2365d51e9726cd288dbeebf20a80d3ac8a38 (diff)
downloadtalos-obmc-linux-4f64a1e93f4749ea2ecacb7e93485ef9607b4e48.tar.gz
talos-obmc-linux-4f64a1e93f4749ea2ecacb7e93485ef9607b4e48.zip
wlcore: add space for private area when allocating fw_status
When allocating the fw_status structure, the space for the lower-driver private area was missing. This was causing an illegal write outside the allocated area, which was causing random oopses around the kernel. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 395da0b3377b..bc33ee25f7d1 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -904,7 +904,8 @@ static void wl1271_fw_wakeup(struct wl1271 *wl)
static int wl1271_setup(struct wl1271 *wl)
{
wl->fw_status_1 = kmalloc(WLCORE_FW_STATUS_1_LEN(wl->num_rx_desc) +
- sizeof(*wl->fw_status_2), GFP_KERNEL);
+ sizeof(*wl->fw_status_2) +
+ wl->fw_status_priv_len, GFP_KERNEL);
if (!wl->fw_status_1)
return -ENOMEM;
OpenPOWER on IntegriCloud