linux-stable/arch/blackfin
Anton Vorontsov 2214f707de blackfin: a couple of task->mm handling fixes
The patch fixes two problems:

1. Working with task->mm w/o getting mm or grabing the task lock is
   dangerous as ->mm might disappear (exit_mm() assigns NULL under
   task_lock(), so tasklist lock is not enough).

   We can't use get_task_mm()/mmput() pair as mmput() might sleep,
   so we have to take the task lock while handle its mm.

2. 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 catch this we use find_lock_task_mm(), which walks up all
   threads and returns an appropriate task (with task lock held).

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-31 17:49:30 -07:00
..
boot Kbuild: centralize MKIMAGE and cmd_uimage definitions 2012-03-26 15:49:20 +02:00
configs blackfin: bf60x: add wakeup source select 2012-05-21 14:54:50 +08:00
include Merge branch 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-05-24 16:17:30 -07:00
kernel blackfin: a couple of task->mm handling fixes 2012-05-31 17:49:30 -07:00
lib blackfin: license: Change ADI BSD license 2012-05-21 14:54:30 +08:00
mach-bf518 blackfin: twi: Move TWI peripheral pin request array to platform data 2012-05-21 14:55:00 +08:00
mach-bf527 blackfin: twi: Move TWI peripheral pin request array to platform data 2012-05-21 14:55:00 +08:00
mach-bf533 blackfin: license: Change ADI BSD license 2012-05-21 14:54:30 +08:00
mach-bf537 blackfin: twi: Move TWI peripheral pin request array to platform data 2012-05-21 14:55:00 +08:00
mach-bf538 blackfin: twi: Move TWI peripheral pin request array to platform data 2012-05-21 14:55:00 +08:00
mach-bf548 blackfin: twi: Move TWI peripheral pin request array to platform data 2012-05-21 14:55:00 +08:00
mach-bf561 blackfin: license: Change ADI BSD license 2012-05-21 14:54:30 +08:00
mach-bf609 blackfin: twi: Move TWI peripheral pin request array to platform data 2012-05-21 14:55:00 +08:00
mach-common Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-21 19:43:57 -07:00
mm blackfin: bf60x: add l2 ecc irq handler 2012-05-21 14:54:23 +08:00
oprofile Blackfin arch: remove hardware PM code, oprofile not use it 2009-01-07 23:14:39 +08:00
Clear_BSD.txt blackfin: license: Change ADI BSD license 2012-05-21 14:54:30 +08:00
Kconfig GPIO driver changes for v3.5 merge window 2012-05-24 14:01:46 -07:00
Kconfig.debug blackfin: bf60x: pm: Add a debug option to calculate kernel wakeup time. 2012-05-21 14:54:52 +08:00
Makefile Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-21 19:43:57 -07:00