Skip to content

Commit

Permalink
[media] media: vb2: fix userptr VMA release seq
Browse files Browse the repository at this point in the history
Align vb2 user pointer VMA release sequence with munmap.
Do vm_ops->vm_close before release file.

Signed-off-by: Yu Tang <ytang5@marvell.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Yu Tang authored and Mauro Carvalho Chehab committed Sep 6, 2011
1 parent ba7fcb0 commit 8607c42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/videobuf2-memops.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ void vb2_put_vma(struct vm_area_struct *vma)
if (!vma)
return;

if (vma->vm_file)
fput(vma->vm_file);

if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);

if (vma->vm_file)
fput(vma->vm_file);

kfree(vma);
}
EXPORT_SYMBOL_GPL(vb2_put_vma);
Expand Down

0 comments on commit 8607c42

Please sign in to comment.