- Subject: Re: [PATCH 08/10] um: Fix possible race on task->mm
- From: Richard Weinberger <richard@xxxxxx>
- Date: Sat, 24 Mar 2012 12:12:12 +0100
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, Mike Frysinger <vapier@xxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mundt <lethal@xxxxxxxxxxxx>, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>, John Stultz <john.stultz@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- In-reply-to: <20120324103050.GH29067@lizard>
- References: <20120324102609.GA28356@lizard> <20120324103050.GH29067@lizard>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0
Am 24.03.2012 11:30, schrieb Anton Vorontsov:
> Checking for task->mm 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 let's take the task lock while we care about its mm.
>
> Note that we should also use find_lock_task_mm() to check all process'
> threads for a valid mm, but for uml we'll do it in a separate patch.
>
> Signed-off-by: Anton Vorontsov <anton.vorontsov@xxxxxxxxxx>
Acked-by: Richard Weinberger <richard@xxxxxx>
Thanks,
//richard
Attachment:
signature.asc
Description: OpenPGP digital signature
[Linux OMAP]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]