The patch titled freezer: read PF_BORROWED_MM in a nonracy way has been removed from the -mm tree. Its filename was freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ Subject: freezer: read PF_BORROWED_MM in a nonracy way From: Rafael J. Wysocki <rjw@xxxxxxx> The reading of PF_BORROWED_MM in is_user_space() without task_lock() is racy. Fix it. Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Acked-by: Pavel Machek <pavel@xxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Aneesh Kumar <aneesh.kumar@xxxxxxxxx> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> Cc: Srivatsa Vaddagiri <vatsa@xxxxxxxxxx> Cc: Gautham R Shenoy <ego@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/power/process.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff -puN kernel/power/process.c~freezer-read-pf_borrowed_mm-in-a-nonracy-way kernel/power/process.c --- a/kernel/power/process.c~freezer-read-pf_borrowed_mm-in-a-nonracy-way +++ a/kernel/power/process.c @@ -8,6 +8,7 @@ #undef DEBUG +#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/suspend.h> #include <linux/module.h> @@ -88,7 +89,12 @@ static void cancel_freezing(struct task_ static inline int is_user_space(struct task_struct *p) { - return p->mm && !(p->flags & PF_BORROWED_MM); + int ret; + + task_lock(p); + ret = p->mm && !(p->flags & PF_BORROWED_MM); + task_unlock(p); + return ret; } static unsigned int try_to_freeze_tasks(int freeze_user_space) _ Patches currently in -mm which might be from rjw@xxxxxxx are origin.patch at91-fix-enable-disable_irq_wake-symmetry-in-pcmcia-driver.patch freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch freezer-close-theoretical-race-between-refrigerator-and-thaw_tasks.patch freezer-remove-pf_nofreeze-from-rcutorture-thread.patch freezer-remove-pf_nofreeze-from-bluetooth-threads.patch freezer-add-try_to_freeze-calls-to-all-kernel-threads.patch freezer-fix-vfork-problem.patch freezer-take-kernel_execve-into-consideration.patch fix-pf_nofreeze-and-freezeable-race-2.patch freezer-document-task_lock-in-thaw_process.patch move-frozen_process-to-kernel-power-processc.patch separate-freezer-from-pm-code-rev-2.patch introduce-freezer-flags-rev-2.patch add-common-orderly_poweroff.patch add-suspend-related-notifications-for-cpu-hotplug-statistics.patch shrink_slab-handle-bad-shrinkers.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