Rick Brown wrote:
I was curious that after a call to preempt_disable(), can I call a function that MAY sleep?
Bad idea. That can make the kernel do bad things... Just take a look at schedule() in kernel/sched.c: asmlinkage void __sched schedule(void) { ... if (unlikely(in_atomic() && !current->exit_state)) { printk(KERN_ERR "BUG: scheduling while atomic: " "%s/0x%08x/%d\n", current->comm, preempt_count(), current->pid); dump_stack(); } Of course, in_atomic() checks whether you disabled preemption. -- What is important? What you want to be true, or what is true? -- VGER BF report: H 1.11022e-16 - To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs