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: | 1004 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-05-21 20:30:05 UTC |
974 struct rq *rq = task_rq(p); 975 976 smp_mb(); /* spin-unlock-wait is not a full memory barrier */ 977 spin_unlock_wait(&rq->lock); 978} 979 980static void __task_rq_unlock(struct rq *rq) 981 __releases(rq->lock) 982{ 983 spin_unlock(&rq->lock); 984} 985 986static inline void task_rq_unlock(struct rq *rq, unsigned long *flags) 987 __releases(rq->lock) 988{ 989 spin_unlock_irqrestore(&rq->lock, *flags); 990} 991 992/* 993 * this_rq_lock - lock this runqueue and disable interrupts. 994 */ 995static struct rq *this_rq_lock(void) 996 __acquires(rq->lock) 997{ 998 struct rq *rq; 999 1000 local_irq_disable(); 1001 rq = this_rq(); 1002 spin_lock(&rq->lock); 1003 1004 return rq; 1005} 1006 1007#ifdef CONFIG_SCHED_HRTICK 1008/* 1009 * Use HR-timers to deliver accurate preemption points. 1010 * 1011 * Its all a bit involved since we cannot program an hrt while holding the 1012 * rq->lock. So what we do is store a state in in rq->hrtick_* and ask for a 1013 * reschedule event. 1014 *