summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-07-05 21:10:23 +0200
committerIngo Molnar <mingo@kernel.org>2012-07-05 21:10:23 +0200
commit90574ebb7e6e0f7f74636ee87315890ba88d6a4a (patch)
tree5f60106dacbfe246f52aaaf9bac69dd4749f24a6 /tools
parentadd79461a2a7d964a00b4a2fdaf313c4cf9cf4ec (diff)
parentce5c1fe9a9e059b5c58f0a7e2a3e687d0efac815 (diff)
downloadop-kernel-dev-90574ebb7e6e0f7f74636ee87315890ba88d6a4a.zip
op-kernel-dev-90574ebb7e6e0f7f74636ee87315890ba88d6a4a.tar.gz
Merge branch 'perf/urgent' into perf/core
Merge this branch to pick up a fixlet and to update to a more recent base. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/hv/hv_kvp_daemon.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 146fd61..d9834b3 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -701,14 +701,18 @@ int main(void)
pfd.fd = fd;
while (1) {
+ struct sockaddr *addr_p = (struct sockaddr *) &addr;
+ socklen_t addr_l = sizeof(addr);
pfd.events = POLLIN;
pfd.revents = 0;
poll(&pfd, 1, -1);
- len = recv(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0);
+ len = recvfrom(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0,
+ addr_p, &addr_l);
- if (len < 0) {
- syslog(LOG_ERR, "recv failed; error:%d", len);
+ if (len < 0 || addr.nl_pid) {
+ syslog(LOG_ERR, "recvfrom failed; pid:%u error:%d %s",
+ addr.nl_pid, errno, strerror(errno));
close(fd);
return -1;
}
OpenPOWER on IntegriCloud