Re: [patch] Real-Time Preemption, -RT-2.6.10-rc3-mm1-V0.7.34-01

From: Kevin Hilman
Date: Tue Jan 11 2005 - 10:38:18 EST


Using V0.7.34-01, I'm seeing the 'lock held at task exit time' bug.
It's coming from a kernel module which in its init function creates a
thread. The thread does a daemonize() and then goes to sleep waiting
on a semaphore which will be up'ed elsewhere. In other words:

init_module()
- sema_init(&sem, 0)
- kernel_thread(thread_func, 0, 0);

thread_func()
- daemonize()
- down(&sem)

The BUG() (see below for log) seems to be triggered when insmod exits.

BUG: insmod/2115, lock held at task exit time!
[c883225c] {&tinfo[i].sem}
.. held by: insmod: 2115 [c7b6f340, 0]
... acquired at: threads_init+0x8e/0x170 [rt_kthreads]
hm, PI interest held at exit time? Task:
insmod: 2115 [c7b6f340, 0]-------------------------
| waiter struct c4c1bf74:
| w->task:
insmod: 2123 [c7e68680, 0]
| lock:
[c883225c] {&tinfo[i].sem}
.. held by: insmod: 2115 [c7b6f340, 0]
... acquired at: threads_init+0x8e/0x170 [rt_kthreads]
| blocked at: thread_func+0x3d/0xb0 [rt_kthreads]
-------------------------


--
Kevin Hilman
http://hilman.org/kevin/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/