Re: [PATCH v7 3.2-rc2 4/30] uprobes: Define hooks for mmap/munmap.

From: Peter Zijlstra
Date: Wed Nov 23 2011 - 12:14:19 EST


On Fri, 2011-11-18 at 16:37 +0530, Srikar Dronamraju wrote:
> +int mmap_uprobe(struct vm_area_struct *vma)
> +{
> + struct list_head tmp_list;
> + struct uprobe *uprobe, *u;
> + struct inode *inode;
> + int ret = 0, count = 0;
> +
> + if (!atomic_read(&uprobe_events) || !valid_vma(vma, true))
> + return ret; /* Bail-out */
> +
> + inode = igrab(vma->vm_file->f_mapping->host);
> + if (!inode)
> + return ret;

Since we hold mmap_sem, vma is pinned, which should pin the inode, why
take out another ref?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/