lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 02/94] drm/i915/selftests: Use vma_lookup() in __igt_mmap()
    Date
    vma_lookup() will look up the vma at a specific address.  find_vma()
    will start the search for a specific address and continue upwards. This
    fixes an issue with the selftest as the returned vma may not be the
    newly created vma, but simply the vma at a higher address.

    Fixes: 6fedafacae1b (drm/i915/selftests: Wrap vm_mmap() around GEM
    objects
    Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
    ---
    drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
    index 5cf6df49c333..35c15ef1327d 100644
    --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
    +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
    @@ -871,7 +871,7 @@ static int __igt_mmap(struct drm_i915_private *i915,

    pr_debug("igt_mmap(%s, %d) @ %lx\n", obj->mm.region->name, type, addr);

    - area = find_vma(current->mm, addr);
    + area = vma_lookup(current->mm, addr);
    if (!area) {
    pr_err("%s: Did not create a vm_area_struct for the mmap\n",
    obj->mm.region->name);
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-04-28 17:37    [W:4.051 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site