Commit 87c036be authored by Andrei Vagin's avatar Andrei Vagin

service: call kerndat_init() before feature check

setup_opts_from_req() sets up logging and call kerndat_init().
Investigated-by: 's avatarAdrian Reber <areber@redhat.com>
Fixes: 6e04f3b2dd06 ("criu: call kerndat_init() after log_init()")
Signed-off-by: 's avatarAndrei Vagin <avagin@gmail.com>
parent 8517bc7d
...@@ -971,6 +971,9 @@ static int handle_feature_check(int sk, CriuReq * msg) ...@@ -971,6 +971,9 @@ static int handle_feature_check(int sk, CriuReq * msg)
} }
if (pid == 0) { if (pid == 0) {
/* kerndat_init() is called from setup_opts_from_req() */
if (setup_opts_from_req(sk, msg->opts))
exit(1);
setproctitle("feature-check --rpc"); setproctitle("feature-check --rpc");
...@@ -994,7 +997,7 @@ static int handle_feature_check(int sk, CriuReq * msg) ...@@ -994,7 +997,7 @@ static int handle_feature_check(int sk, CriuReq * msg)
* be send from the parent process. * be send from the parent process.
*/ */
ret = send_criu_msg(sk, &resp); ret = send_criu_msg(sk, &resp);
exit(ret); exit(!!ret);
} }
if (waitpid(pid, &status, 0) != pid) { if (waitpid(pid, &status, 0) != pid) {
pr_perror("Unable to wait %d", pid); pr_perror("Unable to wait %d", pid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment