Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352745
b: refs/heads/master
c: de2070f
h: refs/heads/master
i:
  352743: 2276a70
v: v3
  • Loading branch information
Mohammed Shafi Shajakhan authored and Kalle Valo committed Nov 27, 2012
1 parent 1b60c0f commit c76ec27
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e16ccfeefbba6a268d00eb04145a172ad6e51cd8
refs/heads/master: de2070fc4aa7c0205348010f500f5abce012e67b
16 changes: 16 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/htc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,22 @@ static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
u16 payload_len;
int status = 0;

/*
* ar->htc_target can be NULL due to a race condition that can occur
* during driver initialization(we do 'ath6kl_hif_power_on' before
* initializing 'ar->htc_target' via 'ath6kl_htc_create').
* 'ath6kl_hif_power_on' assigns 'ath6kl_recv_complete' as
* usb_complete_t/callback function for 'usb_fill_bulk_urb'.
* Thus the possibility of ar->htc_target being NULL
* via ath6kl_recv_complete -> ath6kl_usb_io_comp_work.
*/
if (WARN_ON_ONCE(!target)) {
ath6kl_err("Target not yet initialized\n");
status = -EINVAL;
goto free_skb;
}


netdata = skb->data;
netlen = skb->len;

Expand Down

0 comments on commit c76ec27

Please sign in to comment.