[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.17 / 0144-wl1251-fix-crash-on-remove-due-to-leftover-work-item.patch
1 From aac395832157e17755262dfe2f08d99a454f66f9 Mon Sep 17 00:00:00 2001
2 From: Grazvydas Ignotas <notasas@gmail.com>
3 Date: Thu, 26 Apr 2012 23:07:44 +0300
4 Subject: [PATCH 144/165] wl1251: fix crash on remove due to leftover work
5 item
7 commit 4c1bcdb5a3354b250b82a67549f57ac27a3bb85f upstream.
9 This driver currently leaves elp_work behind when stopping, which
10 occasionally results in data corruption because work function ends
11 up accessing freed memory, typical symptoms of this are various
12 worker_thread crashes. Fix it by cancelling elp_work.
14 Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17 ---
18 drivers/net/wireless/wl1251/main.c | 1 +
19 1 files changed, 1 insertions(+), 0 deletions(-)
21 diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
22 index ba3268e..40c1574 100644
23 --- a/drivers/net/wireless/wl1251/main.c
24 +++ b/drivers/net/wireless/wl1251/main.c
25 @@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
26 cancel_work_sync(&wl->irq_work);
27 cancel_work_sync(&wl->tx_work);
28 cancel_work_sync(&wl->filter_work);
29 + cancel_delayed_work_sync(&wl->elp_work);
31 mutex_lock(&wl->mutex);
33 --
34 1.7.7.6