From: Matt Helsley This patch switches task_watchers from atomic to blocking notifier chains, allowing notifier_calls to sleep. Signed-off-by: Matt Helsley Signed-off-by: Andrew Morton --- drivers/connector/cn_proc.c | 2 +- kernel/sys.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff -puN drivers/connector/cn_proc.c~task-watchers-allow-task-watchers-to-block drivers/connector/cn_proc.c --- a/drivers/connector/cn_proc.c~task-watchers-allow-task-watchers-to-block +++ a/drivers/connector/cn_proc.c @@ -195,7 +195,7 @@ static int cn_proc_watch_task(struct not memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); msg->ack = 0; /* not used */ msg->len = sizeof(*ev); - cn_netlink_send(msg, CN_IDX_PROC, GFP_ATOMIC); + cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); /* If cn_netlink_send() fails, drop data */ return rc; } diff -puN kernel/sys.c~task-watchers-allow-task-watchers-to-block kernel/sys.c --- a/kernel/sys.c~task-watchers-allow-task-watchers-to-block +++ a/kernel/sys.c @@ -435,23 +435,23 @@ int unregister_reboot_notifier(struct no EXPORT_SYMBOL(unregister_reboot_notifier); /* task watchers notifier chain */ -static ATOMIC_NOTIFIER_HEAD(task_watchers); +static BLOCKING_NOTIFIER_HEAD(task_watchers); int register_task_watcher(struct notifier_block *nb) { - return atomic_notifier_chain_register(&task_watchers, nb); + return blocking_notifier_chain_register(&task_watchers, nb); } EXPORT_SYMBOL_GPL(register_task_watcher); int unregister_task_watcher(struct notifier_block *nb) { - return atomic_notifier_chain_unregister(&task_watchers, nb); + return blocking_notifier_chain_unregister(&task_watchers, nb); } EXPORT_SYMBOL_GPL(unregister_task_watcher); int notify_watchers(unsigned long val, void *v) { - return atomic_notifier_call_chain(&task_watchers, val, v); + return blocking_notifier_call_chain(&task_watchers, val, v); } static int set_one_prio(struct task_struct *p, int niceval, int error) _