[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printk in interrupt handlers?



Hi..
I was under the impression that it is ok to use printk in interrupt
handlers. I tried to use printk in some scheduling code (which, if I
am not mistaken, is called on return from the local APIC timer
interrupt handler). Unfortunately, this deadlocks my system. A one
line message appears (recursive spin lock on CPU\1, with different
processes as current when it happens). I have compiled in deplock,
locking self-tests, and almost every other self-test found in the
Accidentally, I found this commentary while observing switch_to:
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */


IMHO, that means, it can block...and interrupt handler should not block while in top half IIRC.

regards,

Mulyadi


-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/