Kaynağa Gözat

qcacld-3.0: Fix access to ol_rx_thread after thread shutdown

Currenty we are trying to access the ol_rx_thread in
ds_cpu_hotplug_notify function after we shut the thread
down in cds_sched_close function

To address the issue keep a NULL check for the ol_rx_thread

Change-Id: Icddd3ace52bbe773790546d1ace1fd463bc1a7e7
CRs-Fixed: 2200501
jitiphil 7 yıl önce
ebeveyn
işleme
5256306ace
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      core/cds/src/cds_sched.c

+ 2 - 1
core/cds/src/cds_sched.c

@@ -387,7 +387,8 @@ static void __cds_cpu_hotplug_notify(uint32_t cpu, bool cpu_up)
 	if (pref_cpu == 0)
 		return;
 
-	if (!cds_set_cpus_allowed_ptr(pSchedContext->ol_rx_thread, pref_cpu))
+	if (pSchedContext->ol_rx_thread &&
+	    !cds_set_cpus_allowed_ptr(pSchedContext->ol_rx_thread, pref_cpu))
 		affine_cpu = pref_cpu;
 }