From 6e5533204d7db0d4a98552406aaaf5483aa4b74e Mon Sep 17 00:00:00 2001 From: gechangwei Date: Fri, 27 Sep 2019 11:56:08 +0800 Subject: [PATCH] =?UTF-8?q?Mod=20aaa-12=20modify=20netlink=20api=20for=20t?= =?UTF-8?q?race=20RCA=EF=BC=9A=20SOL=EF=BC=9A=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=BA:gechangwei=20=E6=A3=80=E8=A7=86=E4=BA=BA:gechangwei?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gechangwei --- Platform/user/netlink_uapi/libnetlinku.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Platform/user/netlink_uapi/libnetlinku.c b/Platform/user/netlink_uapi/libnetlinku.c index 57bb6b2f6..c5dc1a833 100644 --- a/Platform/user/netlink_uapi/libnetlinku.c +++ b/Platform/user/netlink_uapi/libnetlinku.c @@ -218,7 +218,8 @@ int commnl_open_byproto( unsigned int subscriptions,int protocol) memset(&upmh->local, 0, sizeof(upmh->local)); upmh->local.nl_family = AF_NETLINK; - upmh->local.nl_pid = getpid(); + //upmh->local.nl_pid = getpid(); + upmh->local.nl_pid = pthread_self() << 16 | getpid(); upmh->local.nl_groups = subscriptions; if (bind(upmh->fd, (struct sockaddr *)&(upmh->local),