User: | Jiri Slaby |
Error type: | Calling function from invalid context |
Error type description: | Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers |
File location: | kernel/sched.c |
Line in file: | 1992 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2011-11-07 22:19:02 UTC |
1962 ncsw = p->nvcsw | LONG_MIN; /* sets MSB */ 1963 task_rq_unlock(rq, &flags); 1964 1965 /* 1966 * If it changed from the expected state, bail out now. 1967 */ 1968 if (unlikely(!ncsw)) 1969 break; 1970 1971 /* 1972 * Was it really running after all now that we 1973 * checked with the proper locks actually held? 1974 * 1975 * Oops. Go back and try again.. 1976 */ 1977 if (unlikely(running)) { 1978 cpu_relax(); 1979 continue; 1980 } 1981 1982 /* 1983 * It's not enough that it's not actively running, 1984 * it must be off the runqueue _entirely_, and not 1985 * preempted! 1986 * 1987 * So if it wa still runnable (but just not actively 1988 * running right now), it's preempted, and we should 1989 * yield - it could be a while. 1990 */ 1991 if (unlikely(on_rq)) { 1992 schedule_timeout_uninterruptible(1); 1993 continue; 1994 } 1995 1996 /* 1997 * Ahh, all good. It wasn't running, and it wasn't 1998 * runnable, which means that it will never become 1999 * running in the future either. We're all done! 2000 */ 2001 break; 2002 }