diff options
author | Rob Herring <robh@kernel.org> | 2014-05-14 03:34:35 +0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-05-14 03:34:35 +0400 |
commit | eafd370dfe487facfdef499057f4eac9aa0b4bf5 (patch) | |
tree | 0925a67cd658cdf4811f49b4cd2073f663166bd0 /mm/vmacache.c | |
parent | c3fc952d2fbe3ec78defd70cf73d5d76d27092ec (diff) | |
parent | fb2caa50fbacd21719a90dd66b617ce3cb4fd6d7 (diff) | |
download | linux-eafd370dfe487facfdef499057f4eac9aa0b4bf5.tar.xz |
Merge branch 'dt-bus-name' into for-next
Diffstat (limited to 'mm/vmacache.c')
-rw-r--r-- | mm/vmacache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/vmacache.c b/mm/vmacache.c index d4224b397c0e..1037a3bab505 100644 --- a/mm/vmacache.c +++ b/mm/vmacache.c @@ -81,10 +81,12 @@ struct vm_area_struct *vmacache_find(struct mm_struct *mm, unsigned long addr) for (i = 0; i < VMACACHE_SIZE; i++) { struct vm_area_struct *vma = current->vmacache[i]; - if (vma && vma->vm_start <= addr && vma->vm_end > addr) { - BUG_ON(vma->vm_mm != mm); + if (!vma) + continue; + if (WARN_ON_ONCE(vma->vm_mm != mm)) + break; + if (vma->vm_start <= addr && vma->vm_end > addr) return vma; - } } return NULL; |