qcacmn: skip monitor reap timer if irq is enabled

For CFR test, monitor reap timer will start, meanwhile
irq for monitor status ring is also enabled, these two will
conflict and access mon_pdev->rx_status_q in the same time,
skb double free issue is reported.

If irq for monitor status ring has been enabled, skip to start
monitor reap timer which is unnecessary.

Change-Id: Ic015d370cb80604d7e4c261054ad529b64edca25
CRs-Fixed: 3614097
This commit is contained in:
Jinwei Chen
2023-09-13 04:06:34 -07:00
committed by Rahul Choudhary
부모 52662b6274
커밋 65fdbbce9a
2개의 변경된 파일41개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@@ -604,6 +604,25 @@ static void dp_mon_reap_timer_deinit(struct dp_soc *soc)
}
}
/**
* dp_mon_is_irq_enabled() - check if DP monitor status srng irq enabled
* @soc: point to soc
*
* Return: true if irq enabled, false if not.
*/
static bool
dp_mon_is_irq_enabled(struct dp_soc *soc)
{
void *mon_status_srng;
mon_status_srng = soc->rxdma_mon_status_ring[0].hal_srng;
if (!mon_status_srng)
return false;
return hal_srng_batch_threshold_irq_enabled(mon_status_srng);
}
/**
* dp_mon_reap_timer_start() - start reap timer of monitor status ring
* @soc: point to soc
@@ -621,7 +640,8 @@ dp_mon_reap_timer_start(struct dp_soc *soc, enum cdp_mon_reap_source source)
struct dp_mon_soc *mon_soc = soc->monitor_soc;
bool do_start;
if (!mon_soc->reap_timer_init)
/* if monitor status ring irq enabled, no need to start timer */
if (!mon_soc->reap_timer_init || dp_mon_is_irq_enabled(soc))
return false;
qdf_spin_lock_bh(&mon_soc->reap_timer_lock);
@@ -656,7 +676,7 @@ dp_mon_reap_timer_stop(struct dp_soc *soc, enum cdp_mon_reap_source source)
struct dp_mon_soc *mon_soc = soc->monitor_soc;
bool do_stop;
if (!mon_soc->reap_timer_init)
if (!mon_soc->reap_timer_init || dp_mon_is_irq_enabled(soc))
return false;
qdf_spin_lock_bh(&mon_soc->reap_timer_lock);