The patch titled printk: robustify printk has been removed from the -mm tree. Its filename was printk-robustify-printk.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: printk: robustify printk From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Avoid deadlocks against rq->lock and xtime_lock by using RCU to defer the klogd wakeup. [akpm@xxxxxxxxxxxxxxxxxxxx: make klogd_wakeup_state static] Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Acked-by: Steven Rostedt <srostedt@xxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Acked-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/printk.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff -puN kernel/printk.c~printk-robustify-printk kernel/printk.c --- a/kernel/printk.c~printk-robustify-printk +++ a/kernel/printk.c @@ -32,6 +32,7 @@ #include <linux/security.h> #include <linux/bootmem.h> #include <linux/syscalls.h> +#include <linux/rcupdate.h> #include <asm/uaccess.h> @@ -982,10 +983,37 @@ int is_console_locked(void) return console_locked; } +struct klogd_wakeup_state { + struct rcu_head head; + int pending; +}; + +static DEFINE_PER_CPU(struct klogd_wakeup_state, kws); + +void __wake_up_klogd(struct rcu_head *head) +{ + struct klogd_wakeup_state *kws = + container_of(head, struct klogd_wakeup_state, head); + + wake_up_interruptible(&log_wait); + kws->pending = 0; +} + void wake_up_klogd(void) { - if (!oops_in_progress && waitqueue_active(&log_wait)) - wake_up_interruptible(&log_wait); + unsigned long flags; + struct klogd_wakeup_state *kws; + + if (!waitqueue_active(&log_wait)) + return; + + local_irq_save(flags); + kws = &__get_cpu_var(kws); + if (!kws->pending) { + kws->pending = 1; + call_rcu(&kws->head, __wake_up_klogd); + } + local_irq_restore(flags); } /** _ Patches currently in -mm which might be from a.p.zijlstra@xxxxxxxxx are origin.patch printk-robustify-printk.patch linux-next.patch sched-type-fix.patch lockdep-fix-combinatorial-explosion-in-lock-subgraph-traversal.patch lockdep-fix-combinatorial-explosion-in-lock-subgraph-traversal-fix.patch lockdep-lock_set_subclass-reset-a-held-locks-subclass.patch lockdep-re-annotate-scheduler-runqueues.patch lockdep-shrink-held_lock-structure.patch lockdep-shrink-held_lock-structure-fix.patch lockdep-shrink-held_lock-structure-fix-2.patch lockdep-map_acquire.patch lockdep-lock-protection-locks.patch lockdep-spin_lock_nest_lock.patch lockdep-spin_lock_nest_lock-fix.patch lockdep-spin_lock_nest_lock-fix-checkpatch-fixes.patch lockdep-annotate-mm_take_all_locks.patch lockdep-handle-chains-involving-classes-defined-in-modules.patch mm-fix-mm_take_all_locks-locking-order.patch irq-warn-about-irqf_disabledirqf_shared.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html