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-21 22:43:32 +0400 |
commit | b2dab2f2c0c7cdb5693bb3fab5f9bfec2c288da6 (patch) | |
tree | 6a34dd41105750033f2932fce1b02ff2eaa9324e | |
parent | c0579d6040239d97c5c7fc1b5555d566ba6bb619 (diff) |
VB2-DC: Fix Null pointer related kernel boot crashtracking-llct-last-minute-ll-20120621.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; |