mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: + smaps-add-clear_refs-file-to-clear-reference.patch added to -mm tree
@ 2007-02-10  0:39 Oleg Nesterov
  2007-02-10  1:01 ` Andrew Morton
  2007-02-10  1:01 ` David Rientjes
  0 siblings, 2 replies; 3+ messages in thread
From: Oleg Nesterov @ 2007-02-10  0:39 UTC (permalink / raw)
  To: David Rientjes
  Cc: Hugh Dickins, Paul Mundt, Christoph Lameter, Andrew Morton, linux-kernel

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-10  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-10  0:39 + smaps-add-clear_refs-file-to-clear-reference.patch added to -mm tree Oleg Nesterov
2007-02-10  1:01 ` Andrew Morton
2007-02-10  1:01 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®