소스 검색

qcacmn: Fix the leak in ce tasklet counting on one-msi platform

On one-msi platform, when some ce tasklet execute, other srng such
as reo generate the interrupt, the ce interrupt handler can also be
called and then schedule the ce tasklet, if the running ce tasklet
intend to re-schedule itself due to the rx pending, obviously will
fail, then ce active tasklet count leaked.

Decrease the ce active tasklet count if failed to re-schedule when ce
rx pending.

Change-Id: I36c1c6c007735e192bee5af12aab674ee8324ca9
CRs-Fixed: 2830443
Li Feng 4 년 전
부모
커밋
8c267f9645
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      hif/src/ce/ce_tasklet.c

+ 8 - 0
hif/src/ce/ce_tasklet.c

@@ -373,6 +373,14 @@ static void ce_tasklet(unsigned long data)
 		hif_record_ce_desc_event(scn, tasklet_entry->ce_id,
 				HIF_CE_TASKLET_RESCHEDULE, NULL, NULL, -1, 0);
 
+		if (test_bit(TASKLET_STATE_SCHED,
+			     &tasklet_entry->intr_tq.state)) {
+			hif_info("ce_id%d tasklet was scheduled, return",
+				 tasklet_entry->ce_id);
+			qdf_atomic_dec(&scn->active_tasklet_cnt);
+			return;
+		}
+
 		ce_schedule_tasklet(tasklet_entry);
 		return;
 	}