]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sh: use clear_tasks_mm_cpumask()
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 3 May 2012 05:44:45 +0000 (15:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:58 +0000 (15:46 +1000)
commita37ed7f0bb6b232af08523d02ca1dd2d3b8e7e51
tree082c7d8dcce233cb3f725b24792a770a94e3c902
parent6e2f332474c262122feebbf5de97471e92a04e39
sh: use clear_tasks_mm_cpumask()

Checking for process->mm is not enough because process' main thread may
exit or detach its mm via use_mm(), but other threads may still have a
valid mm.

To fix this we would need to use find_lock_task_mm(), which would walk up
all threads and returns an appropriate task (with task lock held).

clear_tasks_mm_cpumask() has the issue fixed, so let's use it.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/sh/kernel/smp.c