diff mbox series

[v2,11/13] udmabuf: drop WARN_ON() check.

Message ID 20180911134216.9760-12-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series udmabuf: misc fixes. | expand

Commit Message

Gerd Hoffmann Sept. 11, 2018, 1:42 p.m. UTC
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/dma-buf/udmabuf.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Laurent Pinchart Sept. 11, 2018, 3:07 p.m. UTC | #1
Hi Gerd,

Thank you for the patch.

On Tuesday, 11 September 2018 16:42:14 EEST Gerd Hoffmann wrote:

Still no commit message ? :-)

> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/dma-buf/udmabuf.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
> index b637a8be6d..7a4fd2194d 100644
> --- a/drivers/dma-buf/udmabuf.c
> +++ b/drivers/dma-buf/udmabuf.c
> @@ -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;
Gerd Hoffmann Sept. 12, 2018, 6:10 a.m. UTC | #2
On Tue, Sep 11, 2018 at 06:07:10PM +0300, Laurent Pinchart wrote:
> Hi Gerd,
> 
> Thank you for the patch.
> 
> On Tuesday, 11 September 2018 16:42:14 EEST Gerd Hoffmann wrote:
> 
> Still no commit message ? :-)

Well, there isn't much to explain about that one ...

cheers,
  Gerd
diff mbox series

Patch

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index b637a8be6d..7a4fd2194d 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -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;