Parcourir la source

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
Nirav Shah il y a 9 ans
Parent
commit
331172a1d9
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      core/cds/src/cds_sched.c

+ 1 - 1
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) {