uti: Use copy_from_user() in mcexec_terminate_thread()
This commit is contained in:
@ -2459,9 +2459,12 @@ mcexec_sig_thread(ihk_os_t os, unsigned long arg, struct file *file)
|
||||
long
|
||||
mcexec_terminate_thread(ihk_os_t os, unsigned long *param, struct file *file)
|
||||
{
|
||||
int pid = param[0];
|
||||
int tid = param[1];
|
||||
struct task_struct *tsk = (struct task_struct *)param[3];
|
||||
unsigned long param[4];
|
||||
int rc;
|
||||
int pid;
|
||||
int tid;
|
||||
long sig;
|
||||
struct task_struct *tsk;
|
||||
unsigned long flags;
|
||||
struct host_thread *thread;
|
||||
struct host_thread *prev;
|
||||
@ -2469,6 +2472,17 @@ mcexec_terminate_thread(ihk_os_t os, unsigned long *param, struct file *file)
|
||||
struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os);
|
||||
struct mcctrl_per_proc_data *ppd;
|
||||
|
||||
if (copy_from_user(param, arg, sizeof(unsigned long) * 4)) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
pid = param[0];
|
||||
tid = param[1];
|
||||
sig = param[2];
|
||||
tsk = (struct task_struct *)param[3];
|
||||
|
||||
//printk("%s: pid=%d,tid=%d,sig=%lx,task=%p\n", __FUNCTION__, pid, tid, sig, tsk);
|
||||
|
||||
write_lock_irqsave(&host_thread_lock, flags);
|
||||
for (prev = NULL, thread = host_threads; thread;
|
||||
prev = thread, thread = thread->next) {
|
||||
|
||||
Reference in New Issue
Block a user