mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 23:05:39 +00:00
restore: Make sure the last_pid is writen with zero offset
Otherwise I see on 3.16-rc1 and higher | [ 100.851730] futex wrote to ns_last_pid when file position was not 0! | This will not be supported in the future. To silence this | warning, set kernel.sysctl_writes_strict = -1 Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
687c389478
commit
7f3de2889e
@@ -887,6 +887,7 @@ long __export_restore_task(struct task_restore_args *args)
|
|||||||
|
|
||||||
new_sp = restorer_stack(thread_args + i);
|
new_sp = restorer_stack(thread_args + i);
|
||||||
last_pid_len = vprint_num(last_pid_buf, sizeof(last_pid_buf), thread_args[i].pid - 1, &s);
|
last_pid_len = vprint_num(last_pid_buf, sizeof(last_pid_buf), thread_args[i].pid - 1, &s);
|
||||||
|
sys_lseek(fd, 0, SEEK_SET);
|
||||||
ret = sys_write(fd, s, last_pid_len);
|
ret = sys_write(fd, s, last_pid_len);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pr_err("Can't set last_pid %ld/%s\n", ret, last_pid_buf);
|
pr_err("Can't set last_pid %ld/%s\n", ret, last_pid_buf);
|
||||||
|
Reference in New Issue
Block a user