ath6kl: Check for valid endpoint ID in ath6kl_tx_complete()
authorPandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>
Fri, 21 Sep 2012 14:43:09 +0000 (20:13 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 24 Oct 2012 08:49:55 +0000 (11:49 +0300)
Endpoint ID is checked to make sure it is valid.

Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/txrx.c

index c4501a9..78b3692 100644 (file)
@@ -704,6 +704,10 @@ void ath6kl_tx_complete(struct htc_target *target,
                                          list);
                list_del(&packet->list);
 
+               if (WARN_ON_ONCE(packet->endpoint == ENDPOINT_UNUSED ||
+                                packet->endpoint >= ENDPOINT_MAX))
+                       continue;
+
                ath6kl_cookie = (struct ath6kl_cookie *)packet->pkt_cntxt;
                if (WARN_ON_ONCE(!ath6kl_cookie))
                        continue;