diff --git a/trace-msg.c b/trace-msg.c index e1abbbb99bb4..453901981c90 100644 --- a/trace-msg.c +++ b/trace-msg.c @@ -390,6 +390,9 @@ int tracecmd_msg_send_init_data(int fd) if (ret < 0) return ret; + if (ntohl(recv_msg.hdr.cmd) != MSG_RINIT) + return -EINVAL; + cpus = ntohl(recv_msg.rinit.cpus); client_ports = malloc_or_die(sizeof(int) * cpus); for (i = 0; i < cpus; i++)