aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 08431f07a999..7a30addfd235 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4091,8 +4091,10 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
4091 read_unlock_irq(&tasklist_lock); 4091 read_unlock_irq(&tasklist_lock);
4092 return -ESRCH; 4092 return -ESRCH;
4093 } 4093 }
4094 retval = sched_setscheduler(p, policy, &lparam); 4094 get_task_struct(p);
4095 read_unlock_irq(&tasklist_lock); 4095 read_unlock_irq(&tasklist_lock);
4096 retval = sched_setscheduler(p, policy, &lparam);
4097 put_task_struct(p);
4096 return retval; 4098 return retval;
4097} 4099}
4098 4100