linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ath6kl: Fix htc_packet leak in ath6kl_htc_rx_process_packets()
@ 2011-09-29 15:01 Vasanthakumar Thiagarajan
  2011-09-29 15:01 ` [PATCH 2/4] ath6kl: Fix htc_packet leak in ath6kl_htc_rx_fetch() Vasanthakumar Thiagarajan
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-09-29 15:01 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

Packet is not reclaimed when ath6kl_htc_rx_process_hdr() fails.
Fix this by deferring the packet deletion from comp_pktq till
ath6kl_htc_rx_process_hdr() returns success.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/htc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index f88a7c9..7bc9884 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -1643,7 +1643,6 @@ static int ath6kl_htc_rx_process_packets(struct htc_target *target,
 	int status = 0;
 
 	list_for_each_entry_safe(packet, tmp_pkt, comp_pktq, list) {
-		list_del(&packet->list);
 		ep = &target->endpoint[packet->endpoint];
 
 		/* process header for each of the recv packet */
@@ -1652,6 +1651,8 @@ static int ath6kl_htc_rx_process_packets(struct htc_target *target,
 		if (status)
 			return status;
 
+		list_del(&packet->list);
+
 		if (list_empty(comp_pktq)) {
 			/*
 			 * Last packet's more packet flag is set
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-10-03 11:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29 15:01 [PATCH 1/4] ath6kl: Fix htc_packet leak in ath6kl_htc_rx_process_packets() Vasanthakumar Thiagarajan
2011-09-29 15:01 ` [PATCH 2/4] ath6kl: Fix htc_packet leak in ath6kl_htc_rx_fetch() Vasanthakumar Thiagarajan
2011-09-29 15:01 ` [PATCH 3/4] ath6kl: Avoid processing failed rx packets Vasanthakumar Thiagarajan
2011-10-03 11:18   ` Kalle Valo
2011-10-03 11:41     ` Vasanthakumar Thiagarajan
2011-10-03 11:44       ` Kalle Valo
2011-09-29 15:01 ` [PATCH 4/4] ath6kl: Minor cleanup in msg_look_ahead parameter in ath6kl_htc_rxmsg_pending_handler() Vasanthakumar Thiagarajan
2011-10-03 11:11 ` [PATCH 1/4] ath6kl: Fix htc_packet leak in ath6kl_htc_rx_process_packets() Kalle Valo
2011-10-03 11:40   ` Vasanthakumar Thiagarajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).