aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 9968c5fb55b9..bc1dc61c31ed 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -163,6 +163,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
163 if (niceval > 19) 163 if (niceval > 19)
164 niceval = 19; 164 niceval = 19;
165 165
166 rcu_read_lock();
166 read_lock(&tasklist_lock); 167 read_lock(&tasklist_lock);
167 switch (which) { 168 switch (which) {
168 case PRIO_PROCESS: 169 case PRIO_PROCESS:
@@ -200,6 +201,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
200 } 201 }
201out_unlock: 202out_unlock:
202 read_unlock(&tasklist_lock); 203 read_unlock(&tasklist_lock);
204 rcu_read_unlock();
203out: 205out:
204 return error; 206 return error;
205} 207}