From: Pandiyarajan Pitchaimuthu Date: Fri, 21 Sep 2012 14:43:09 +0000 (+0530) Subject: ath6kl: Check for valid endpoint ID in ath6kl_tx_complete() X-Git-Tag: v3.8-rc1~139^2~17^2~198^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=307749406d7daea452d55df76f734b4fffddf599;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ath6kl: Check for valid endpoint ID in ath6kl_tx_complete() Endpoint ID is checked to make sure it is valid. Signed-off-by: Pandiyarajan Pitchaimuthu Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index c4501a9..78b3692 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -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;