ath9k_htc: Fix memory leak on WMI event handler

ath9k_wmi_ctrl_rx is racy with ath9k_wmi_tasklet on event notification
due to which the wmi_skb may be overwritten which leads to memory leak.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Rajkumar Manoharan
2010-09-14 13:07:28 +05:30
committed by John W. Linville
parent 3a160a5b5f
commit cc0de6536e
2 changed files with 23 additions and 55 deletions

View File

@@ -31,10 +31,6 @@ struct wmi_cmd_hdr {
__be16 seq_no;
} __packed;
struct wmi_swba {
u8 beacon_pending;
} __packed;
enum wmi_cmd_id {
WMI_ECHO_CMDID = 0x0001,
WMI_ACCESS_MEMORY_CMDID,
@@ -104,7 +100,7 @@ struct wmi {
u32 cmd_rsp_len;
bool stopped;
struct sk_buff *wmi_skb;
u8 beacon_pending;
spinlock_t wmi_lock;
atomic_t mwrite_cnt;