udmabuf: drop WARN_ON() check.
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Sep 2018 13:42:14 +0000 (15:42 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Sep 2018 06:21:32 +0000 (08:21 +0200)
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180911134216.9760-12-kraxel@redhat.com
drivers/dma-buf/udmabuf.c

index 5dd73bc..63cc77e 100644 (file)
@@ -25,9 +25,6 @@ static int udmabuf_vm_fault(struct vm_fault *vmf)
        struct vm_area_struct *vma = vmf->vma;
        struct udmabuf *ubuf = vma->vm_private_data;
 
-       if (WARN_ON(vmf->pgoff >= ubuf->pagecount))
-               return VM_FAULT_SIGBUS;
-
        vmf->page = ubuf->pages[vmf->pgoff];
        get_page(vmf->page);
        return 0;