Bug 243311 - printk in atomic can schedule
Summary: printk in atomic can schedule
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel
Version: 1.0
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Steven Rostedt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-08 14:59 UTC by Steven Rostedt
Modified: 2008-02-27 19:56 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-07-26 14:36:10 UTC


Attachments (Terms of Use)

Description Steven Rostedt 2007-06-08 14:59:32 UTC
Description of problem:
printk calls consol functions that write to the appropriate devices.
But in the PREEMPT_RT kernel, some of these console functions grab
spin locks that are converted to mutexes.  This means that calling
printk in an atomic operation or from interrupt contex can schedule
and cause undefined results.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
I need to write a patch that will add an ATOMIC_SAFE flag to the console
drivers. This will be checked if printk is called from an atomic
operation. If the console is not safe, then printk will skip that
console.  Current consoles that should be atomic safe, is the VGA
console as well as early_printk console.

Comment 1 Clark Williams 2007-07-26 14:36:10 UTC
Patch applied 


Note You need to log in before you can comment on or make changes to this bug.