Commit 53d29d7e authored by Andrei Vagin's avatar Andrei Vagin

kdat: fill kdat by zero-s before initializing it

kerndat_try_load_cache() fills kdat from /run/criu.kdat,
so it will contain some trash, if criu.kdat isn't compatible with the
current version of criu.
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmail.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent aeeec216
...@@ -973,6 +973,9 @@ int kerndat_init(void) ...@@ -973,6 +973,9 @@ int kerndat_init(void)
if (ret <= 0) if (ret <= 0)
return ret; return ret;
/* kerndat_try_load_cache can leave some trash in kdat */
memset(&kdat, 0, sizeof(kdat));
preload_socket_modules(); preload_socket_modules();
preload_netfilter_modules(); preload_netfilter_modules();
......
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