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

Commit aafeb6b3 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian Committed by Gerrit - the friendly Code Review server
Browse files

net: ipc_router: Register services only on client port



Allowing services to be registered on a non-client port will cause either
an existing service or a control port to be over-written. This will cause
undefined functional behavior.

Allow the services to be registered only on client ports.

CRs-Fixed: 1101792
Change-Id: If6cfc75e9314204b7b44957f1598a8a2e1a45325
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent c1b67407
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2808,6 +2808,9 @@ int msm_ipc_router_register_server(struct msm_ipc_port *port_ptr,
	if (!port_ptr || !name)
		return -EINVAL;

	if (port_ptr->type != CLIENT_PORT)
		return -EINVAL;

	if (name->addrtype != MSM_IPC_ADDR_NAME)
		return -EINVAL;