Commit e4d14b65 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

kdat: Merge dump and restore kerndats

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent a8409956
......@@ -2167,7 +2167,7 @@ int cr_restore_tasks(void)
if (init_stats(RESTORE_STATS))
goto err;
if (kerndat_init_rst())
if (kerndat_init())
goto err;
timing_start(TIME_RESTORE);
......
......@@ -11,7 +11,6 @@ struct stat;
*/
extern int kerndat_init(void);
extern int kerndat_init_rst(void);
extern int kerndat_get_dirty_track(void);
extern int kerndat_fdinfo_has_lock(void);
extern int kerndat_loginuid(void);
......
......@@ -589,40 +589,8 @@ int kerndat_init(void)
ret = kerndat_tcp_repair();
if (!ret)
ret = kerndat_compat_restore();
kerndat_lsm();
kerndat_mmap_min_addr();
return ret;
}
int kerndat_init_rst(void)
{
int ret;
/*
* Read TCP sysctls before anything else,
* since the limits we're interested in are
* not available inside namespaces.
*/
ret = check_pagemap();
if (!ret)
ret = get_last_cap();
if (!ret)
ret = kerndat_has_memfd_create();
if (!ret)
ret = get_task_size();
if (!ret)
ret = get_ipv6();
if (!ret)
ret = kerndat_loginuid();
if (!ret)
ret = kerndat_iptables_has_xtlocks();
if (!ret)
ret = kerndat_tcp_repair();
if (!ret)
ret = kerndat_compat_restore();
kerndat_lsm();
kerndat_mmap_min_addr();
......
......@@ -111,7 +111,7 @@ void kerndat_lsm(void)
{
/* On restore, if someone passes --lsm-profile, we might end up doing
* detection twice, once during flag parsing and once for
* kerndat_init_rst(). Let's detect when we've already done detection
* kerndat_init(). Let's detect when we've already done detection
* and not do it again.
*/
if (name)
......
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