Skip to content

Commit 27a0410

Browse files
benzeajmberg-intel
authored andcommitted
um: fix unused variable warning
The code was updated to access the PID of the userspace stub process in a different way, making the local cpu variable obsolete. Remove it. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 406d17c ("um: Implement kernel side of SECCOMP based process handling") Signed-off-by: Benjamin Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 9423494 commit 27a0410

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

arch/x86/um/tls_32.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ int host_gdt_entry_tls_min;
2525
static int do_set_thread_area(struct task_struct* task, struct user_desc *info)
2626
{
2727
int ret;
28-
u32 cpu;
2928

3029
if (info->entry_number < host_gdt_entry_tls_min ||
3130
info->entry_number >= host_gdt_entry_tls_min + GDT_ENTRY_TLS_ENTRIES)
@@ -41,9 +40,7 @@ static int do_set_thread_area(struct task_struct* task, struct user_desc *info)
4140
return 0;
4241
}
4342

44-
cpu = get_cpu();
4543
ret = os_set_thread_area(info, task->mm->context.id.pid);
46-
put_cpu();
4744

4845
if (ret)
4946
printk(KERN_ERR "PTRACE_SET_THREAD_AREA failed, err = %d, "

0 commit comments

Comments
 (0)