lkml.org 
[lkml]   [2011]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 3.0-rc2-tip 4/22] 4: Uprobes: register/unregister probes.
    > > +
    > > + 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


    \
     
     \ /
      Last update: 2011-06-09 07:53    [W:8.735 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site