Re: Re: printk in interrupt handlers?

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

 



2007/2/9, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>:
Hi Dong Feng
> My understanding is that a *sleep* operation may cause block, but a
> *wake-up* operation never. And I heard that it is safe to invoke
> printk() in an interrupt handler. Of course not put printk() in
> __switch_to(), but that seems because of some other reason.
Maybe you're right. My other idea is, since printk deals with console
output, maybe if you are doing it inside an interrupt handler that
directly or indirectly deal with console, then it will trigger oops.

Just another 2 cents speculation.


Yes, printk() deals with console. But I guess it does not always but
only when it is safe to do that. If the context does not allow
console-interaction, the printk() simply put the logged message to a
memory buffer and wait for a user space process move the message out
later.

Not confirm by code in details. :-) So welcome other's comments.


regards,

Mulyadi



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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux