From 5256306acecafdb1d9740fb43f2d937a17c5bc4f Mon Sep 17 00:00:00 2001 From: jitiphil Date: Tue, 13 Mar 2018 20:43:05 +0530 Subject: [PATCH] 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 --- core/cds/src/cds_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index e5664a3382d2..926546b18cab 100644 --- a/core/cds/src/cds_sched.c +++ b/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; }