Commit 27a04104 authored by Benjamin Berg's avatar Benjamin Berg Committed by Johannes Berg
Browse files

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: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506050008.AwXLNxQX-lkp@intel.com/


Fixes: 406d17c6 ("um: Implement kernel side of SECCOMP based process handling")
Signed-off-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250605050325.1077208-1-benjamin@sipsolutions.net


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 94234941
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ int host_gdt_entry_tls_min;
static int do_set_thread_area(struct task_struct* task, struct user_desc *info)
{
	int ret;
	u32 cpu;

	if (info->entry_number < host_gdt_entry_tls_min ||
	    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)
		return 0;
	}

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

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