Re: [PATCH v4 3.0-rc2-tip 4/22] 4: Uprobes: register/unregister probes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +
> > +		mm = vma->vm_mm;
> > +		if (!valid_vma(vma)) {
> > +			mmput(mm);
> > +			continue;
> > +		}
> > +
> > +		vaddr = vma->vm_start + offset;
> > +		vaddr -= vma->vm_pgoff << PAGE_SHIFT;
> > +		if (vaddr < vma->vm_start || vaddr > vma->vm_end) {
> 
> This check looks like it is off by one?  vma->vm_end is already one byte
> past the last valid address in the vma, so we should compare using ">="
> here I think.

Right, we are off-by one.
Will correct in the next patchset. 
Will also correct the other places where we check for vm_end.

> > +
> > +	if (!del_consumer(uprobe, consumer)) {
> > +		pr_debug("No uprobe found with consumer %p\n",
> > +				consumer);
> > +		return;
> > +	}
> 
> When del_consumer() fails dont we still need to do a put_uprobe(uprobe)
> to drop the extra access ref?
> 

Yes, we need to check and drop the reference.
Will correct in the next patchset. 

> > +
> > +	INIT_LIST_HEAD(&tmp_list);
> > +
> > +	mapping = inode->i_mapping;

-- 
Thanks and Regards
Srikar

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]