msm: ipc: Fix lockdep warning by IPC message router
IPC Message Router while processing the HELLO message, sends a server list
information registered locally to the remote subsystem which has sent the
HELLO message. IPC Message Router does this operation by locking mutexes
in the following order:
1) routing_table_lock
2) server_list_lock inside msm_ipc_router_send_server_list
IPC Message Router while processing the NEW_SERVER message, accesses the
server list information to check if the server information advertised by
the remote subsystem is already known before adding that information to
the server list. IPC Message Router does this operation by locking mutexes
in the following order:
1) server_list_lock
2) routing_table_lock inside msm_ipc_router_lookup_remote_port
This leads to a deadlock if the IPC message router processes HELLO message
from one subsystem and NEW_SERVER message from another subsystem. Fix this
out of order locking scenario by locking the server_list_lock before
accessing the msm_ipc_router_send_server_list function.
CRs-Fixed: 417155
Change-Id: Ie38c1c21dccefac7a9b36ad107b13feccd986ed2
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
1 file changed