Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7eb2fc6 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

net: ipc_router: Defer workqueue initialization



IPC Router workqueue is initialized before some of the core IPC router
data structures are initialized leading to uninitialized data structure
access.

Initialize the workqueue after initializing the core data structures.

CRs-Fixed: 611234
Change-Id: Ia6fbd2f517afcde30b2c924507fbb9f28ccc01e3
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent 792ce78d
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -3389,11 +3389,6 @@ static int __init msm_ipc_router_init(void)
		IPC_RTR_ERR("%s: Unable to create IPC logging for IPC RTR",
			__func__);

	msm_ipc_router_workqueue =
		create_singlethread_workqueue("msm_ipc_router");
	if (!msm_ipc_router_workqueue)
		return -ENOMEM;

	debugfs_init();

	for (i = 0; i < SRV_HASH_SIZE; i++)
@@ -3419,6 +3414,10 @@ static int __init msm_ipc_router_init(void)
	if (ret < 0)
		IPC_RTR_ERR("%s: Security Init failed\n", __func__);

	msm_ipc_router_workqueue =
		create_singlethread_workqueue("msm_ipc_router");
	if (!msm_ipc_router_workqueue)
		return -ENOMEM;
	complete_all(&msm_ipc_local_router_up);
	return ret;
}