[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070210003958.GA3047@tv-sign.ru>
Date: Sat, 10 Feb 2007 03:39:58 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: David Rientjes <rientjes@...gle.com>
Cc: Hugh Dickins <hugh@...itas.com>, Paul Mundt <lethal@...ux-sh.org>,
Christoph Lameter <clameter@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: + smaps-add-clear_refs-file-to-clear-reference.patch added to -mm tree
David Rientjes wrote:
>
> +static ssize_t clear_refs_write(struct file *file, const char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> ...
> + task = get_proc_task(file->f_path.dentry->d_inode);
> + if (!task)
> + return -ESRCH;
> + clear_refs_smap(task->mm->mmap);
task->mm may be NULL and not stable, this needs get_task_mm() (may fail).
Don't we also need ->mmap_sem to iterate vmas?
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists