diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-05-21 13:51:19 +0530 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2012-06-22 16:39:27 +0400 |
commit | 1bc2d67f3ff28c3797735a37c2b54b75d47bebb6 (patch) | |
tree | 549e89eed5b86f74c59c0e08e0027a56dbfd392c | |
parent | d0b25ca41ffa8c3183c7d2f172a3dfbe43b780f3 (diff) |
VB2-DC: Fix Null pointer related kernel boot crashtracking-llct-last-minute-fixes-llct-20120622.0
vma->vm_mm should point to the proper mm structure. But the pointer is
NULL here. Explicitly setting it to current->mm to avoid kernel crash
during bootup.
Signed-off-by: Ritesh Kumar Solanki <r.solanki@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
-rw-r--r-- | drivers/media/video/videobuf2-dma-contig.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf2-dma-contig.c b/drivers/media/video/videobuf2-dma-contig.c index a84af850d1fe..459c0e2efa9d 100644 --- a/drivers/media/video/videobuf2-dma-contig.c +++ b/drivers/media/video/videobuf2-dma-contig.c @@ -246,6 +246,9 @@ static inline int vma_is_io(struct vm_area_struct *vma) static int vb2_dc_get_user_pages(unsigned long start, struct page **pages, int n_pages, struct vm_area_struct *vma, int write) { + if (vma->vm_mm == NULL) + vma->vm_mm = current->mm; + if (vma_is_io(vma)) { unsigned int i; |