mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-06 01:22:20 +00:00
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From 955bd7e7ac097bdffbadafab90e5378038fefeb2 Mon Sep 17 00:00:00 2001
|
|
From: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
|
|
Date: Thu, 15 Dec 2016 08:13:20 -0700
|
|
Subject: 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: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
|
|
---
|
|
net/ipc_router/ipc_router_core.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/net/ipc_router/ipc_router_core.c b/net/ipc_router/ipc_router_core.c
|
|
index ee4a873..9c784e8 100644
|
|
--- a/net/ipc_router/ipc_router_core.c
|
|
+++ b/net/ipc_router/ipc_router_core.c
|
|
@@ -2799,6 +2799,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;
|
|
|
|
--
|
|
cgit v1.1
|
|
|