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>
This commit is contained in:

committed by
Ingo Molnar

parent
796aadeb1b
commit
b845b517b5
@@ -200,6 +200,8 @@ extern struct ratelimit_state printk_ratelimit_state;
|
||||
extern int printk_ratelimit(void);
|
||||
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||
unsigned int interval_msec);
|
||||
extern void printk_tick(void);
|
||||
extern int printk_needs_cpu(int);
|
||||
#else
|
||||
static inline int vprintk(const char *s, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
@@ -211,6 +213,8 @@ static inline int printk_ratelimit(void) { return 0; }
|
||||
static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
|
||||
unsigned int interval_msec) \
|
||||
{ return false; }
|
||||
static inline void printk_tick(void) { }
|
||||
static inline int printk_needs_cpu(int) { return 0; }
|
||||
#endif
|
||||
|
||||
extern void asmlinkage __attribute__((format(printf, 1, 2)))
|
||||
|
Reference in New Issue
Block a user