User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | kernel/sched.c |
Line in file: | 5056 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-29 20:11:37 UTC |
5026 * does similar things. 5027 */ 5028asmlinkage long sys_nice(int increment) 5029{ 5030 long nice, retval; 5031 5032 /* 5033 * Setpriority might change our priority at the same moment. 5034 * We don't have to worry. Conceptually one call occurs first 5035 * and we have a single winner. 5036 */ 5037 if (increment < -40) 5038 increment = -40; 5039 if (increment > 40) 5040 increment = 40; 5041 5042 nice = PRIO_TO_NICE(current->static_prio) + increment; 5043 if (nice < -20) 5044 nice = -20; 5045 if (nice > 19) 5046 nice = 19; 5047 5048 if (increment < 0 && !can_nice(current, nice)) 5049 return -EPERM; 5050 5051 retval = security_task_setnice(current, nice); 5052 if (retval) 5053 return retval; 5054 5055 set_user_nice(current, nice); 5056 return 0; 5057} 5058 5059#endif 5060 5061/** 5062 * task_prio - return the priority value of a given task. 5063 * @p: the task in question. 5064 * 5065 * This is the priority value as seen by users in /proc. 5066 * RT tasks are offset by -200. Normal tasks are centered