From 1eda5166c7640092f512138be6899d050c3d62ed Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 7 Mar 2012 17:54:00 +0400 Subject: [PATCH] staging: android/lowmemorykiller: Don't unregister notifier from atomic context The lowmemorykiller registers an atomic notifier for notfication of when the task is freed. From this atomic notifier callback, it removes the atomic notifier via task_free_unregister(). This is incorrect because atomic_notifier_chain_unregister() calls syncronize_rcu(), which can sleep, which shouldn't be done from an atomic notifier. Fix this by registering the notifier during init, and only unregister it if the lowmemorykiller is unloaded. Rebased to -next by Paul E. McKenney. Rebased to -next again by Anton Vorontsov. Signed-off-by: Rabin Vincent Signed-off-by: Christian Bejram Signed-off-by: Paul E. McKenney Reported-by: John Stultz Signed-off-by: Anton Vorontsov Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed