Commit d011a9fb authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

restorer: remove always true `has_futex' arg

Check for presence of robust futex list is in the reality
(futex_rla_len != 0).

That does code on dumping, in get_task_futex_robust_list():
> ret = syscall(SYS_get_robust_list, pid, &head, &len);
> if (ret < 0 && errno == ENOSYS) {
[..]
> 	len = 0;
[..]
> }
[..]
> info->futex_rla_len	= (u32)len;

And in images: futex_rla_len == 0 means that futex is not present.

So, we don't need additional restorer's parameter `has_futex'
which is always true, remove it.
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ea6357e6
......@@ -3237,7 +3237,6 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
rst_reloc_creds(&thread_args[i], &creds_pos_next);
thread_args[i].has_futex = true;
thread_args[i].futex_rla = tcore->thread_core->futex_rla;
thread_args[i].futex_rla_len = tcore->thread_core->futex_rla_len;
thread_args[i].pdeath_sig = tcore->thread_core->pdeath_sig;
......
......@@ -82,7 +82,6 @@ struct thread_restore_args {
UserRegsEntry gpregs;
u64 clear_tid_addr;
bool has_futex;
u64 futex_rla;
u32 futex_rla_len;
......
......@@ -426,7 +426,7 @@ static int restore_thread_common(struct thread_restore_args *args)
{
sys_set_tid_address((int *)decode_pointer(args->clear_tid_addr));
if (args->has_futex && args->futex_rla_len) {
if (args->futex_rla_len) {
int ret;
ret = sys_set_robust_list(decode_pointer(args->futex_rla),
......
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