diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-08-08 15:47:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 07:46:53 -0400 |
commit | b845b517b5e3706a3729f6ea83b88ab85f0725b0 (patch) | |
tree | 4311e4c2e6c3fdbdbe89149d1501944294186455 /include | |
parent | 796aadeb1b2db9b5d463946766c5bbfd7717158c (diff) |
printk: robustify printk
Avoid deadlocks against rq->lock and xtime_lock by deferring the klogd
wakeup by polling from the timer tick.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kernel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index aaa998f65c7a..113ac8d0425f 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -200,6 +200,8 @@ extern struct ratelimit_state printk_ratelimit_state; | |||
200 | extern int printk_ratelimit(void); | 200 | extern int printk_ratelimit(void); |
201 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 201 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
202 | unsigned int interval_msec); | 202 | unsigned int interval_msec); |
203 | extern void printk_tick(void); | ||
204 | extern int printk_needs_cpu(int); | ||
203 | #else | 205 | #else |
204 | static inline int vprintk(const char *s, va_list args) | 206 | static inline int vprintk(const char *s, va_list args) |
205 | __attribute__ ((format (printf, 1, 0))); | 207 | __attribute__ ((format (printf, 1, 0))); |
@@ -211,6 +213,8 @@ static inline int printk_ratelimit(void) { return 0; } | |||
211 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | 213 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ |
212 | unsigned int interval_msec) \ | 214 | unsigned int interval_msec) \ |
213 | { return false; } | 215 | { return false; } |
216 | static inline void printk_tick(void) { } | ||
217 | static inline int printk_needs_cpu(int) { return 0; } | ||
214 | #endif | 218 | #endif |
215 | 219 | ||
216 | extern void asmlinkage __attribute__((format(printf, 1, 2))) | 220 | extern void asmlinkage __attribute__((format(printf, 1, 2))) |