From 2881312e10e57a71b7a495533ed7c2ca4593a37e Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Tue, 24 Nov 2015 19:11:58 +0530 Subject: [PATCH] qcacld-3.0: Use appropriate list API Use list_for_each_entry_safe API to traverse list while deleting list entry in cds_drop_rxpkt_by_staid to avoid crash. CRs-Fixed: 943767 Change-Id: I4d09fd88f0faefacfc886866d9045b09feeb4432 --- core/cds/src/cds_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index 9e6d746f8f33..82dfbbc64ce2 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -750,7 +750,7 @@ void cds_drop_rxpkt_by_staid(p_cds_sched_context pSchedContext, uint16_t staId) } spin_unlock_bh(&pSchedContext->ol_rx_queue_lock); - list_for_each_entry(pkt, &local_list, list) { + list_for_each_entry_safe(pkt, tmp, &local_list, list) { list_del(&pkt->list); buf = pkt->Rxpkt; while (buf) {