--- zzzz-none-000/linux-2.4.17/include/asm-i386/mmu_context.h 2001-11-22 19:46:19.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/include/asm-i386/mmu_context.h 2004-11-24 13:21:55.000000000 +0000 @@ -27,6 +27,10 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu) { +#ifdef CONFIG_PREEMPT + if (preempt_is_disabled() == 0) + BUG(); +#endif if (prev != next) { /* stop flush ipis for the previous mm */ clear_bit(cpu, &prev->cpu_vm_mask);