Hi, I am doing few modification in kernel with RT patch enabled. I am calling mod_timer with interrupt disabled ( I can not avoid this with my code design). mod_timer() has rt_spin_lock (mutex that block) for locking timer base. So I am getting kernel following bug BUG: sleeping function called from invalid context at kernel/rtmutex.c:685 in_atomic(): 1, irqs_disabled(): 1 My question is it alright to convert timer lock type into raw_spinlock_t from spinlock_t? I tried to do it and solves problem with mod_timer() bug. But it run into another bug listed as follows. BUG: sleeping function called from invalid context at kernel/rtmutex.c:685 in_atomic(): 1, irqs_disabled(): 1, pid: 5, name: sirq-timer/0 Pid: 5, comm: sirq-timer/0 Not tainted 2.6.29.6-rt23 #92 Call Trace: [<ffffffff804d4502>] ? rt_spin_lock+0x27/0x66 [<ffffffff8023ad76>] ? __wake_up+0x1c/0x42 [<ffffffff802471a4>] ? run_timer_softirq+0x23f/0x252 [<ffffffff802435b0>] ? ksoftirqd+0x14b/0x241 [<ffffffff80243465>] ? ksoftirqd+0x0/0x241 [<ffffffff80243465>] ? ksoftirqd+0x0/0x241 [<ffffffff80250fb9>] ? kthread+0x47/0x76 [<ffffffff8023910c>] ? schedule_tail+0x3f/0xab [<ffffffff8020caca>] ? child_rip+0xa/0x20 [<ffffffff80250f72>] ? kthread+0x0/0x76 [<ffffffff8020cac0>] ? child_rip+0x0/0x20 I think solving problem with raw_spinlock_t will not work. Are there any other suggestions so that I can call mod_timer routine with interrupt disabled? Thank you in advance. Thanks, Meha -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html