From f2af211d3eaeee8d3631f697d0405773b69a6845 Mon Sep 17 00:00:00 2001 From: AnjaneeDevi Kapparapu Date: Sat, 31 Jan 2015 08:13:49 -0800 Subject: qcacld: vos: Fix crash and memory leak caused by driver load failure In vos_sched_open() if any thread creation fails it needs to free TL shim free packet queue and unregister cpu notifier such that kernel does not call cpu notifier callback when driver context is freed. Change-Id: I6aed6d6dc5eb7cf41a348914f55583c842bc6f26 CRs-Fixed: 789429 --- CORE/VOSS/src/vos_sched.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CORE/VOSS/src/vos_sched.c b/CORE/VOSS/src/vos_sched.c index 017ea3f34a98..5ac1a5024cbf 100644 --- a/CORE/VOSS/src/vos_sched.c +++ b/CORE/VOSS/src/vos_sched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -414,6 +414,13 @@ TX_THREAD_START_FAILURE: MC_THREAD_START_FAILURE: //De-initialize all the message queues vos_sched_deinit_mqs(pSchedContext); + + +#ifdef QCA_CONFIG_SMP + unregister_hotcpu_notifier(&vos_cpu_hotplug_notifier); + vos_free_tlshim_pkt_freeq(gpVosSchedContext); +#endif + return VOS_STATUS_E_RESOURCES; } /* vos_sched_open() */ -- cgit v1.2.3