ion: fix null page issue in alloc_buffer_page
authorJianxin Pan <jianxin.pan@amlogic.com>
Wed, 19 Sep 2018 11:08:29 +0000 (19:08 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 9 Oct 2018 02:25:37 +0000 (19:25 -0700)
commita5e7822628bc339e42f88be160499731864aaaff
treea1aefd72d17118661e7962912e8df3cf84b0b015
parent6fc382ccb283fc7bfb7e59a453e5915f00851145
ion: fix null page issue in alloc_buffer_page

PD#173802: Panic trace is
[<c011824c>] (dma_cache_maint_page) from [<c0118400>] (arm_dma_sync_single_for_device+0x58/0x60)
[<c0118400>] (arm_dma_sync_single_for_device) from [<c0118f24>] (arm_dma_sync_sg_for_device+0x60/0x8c)
[<c0118f24>] (arm_dma_sync_sg_for_device) from [<c07e52d0>] (ion_pages_sync_for_device+0x108/0x144)
[<c07e52d0>] (ion_pages_sync_for_device) from [<c07e71b4>] (ion_system_heap_allocate+0x38c/0x3bc)
[<c07e71b4>] (ion_system_heap_allocate) from [<c07e4c2c>] (ion_alloc+0x1e4/0x4d8)
[<c07e4c2c>] (ion_alloc) from [<c07e59f0>] (ion_ioctl+0x3b8/0x428)
[<c07e59f0>] (ion_ioctl) from [<c02a9368>] (do_vfs_ioctl+0xc0/0xa34)
[<c02a9368>] (do_vfs_ioctl) from [<c02a9d58>] (SyS_ioctl+0x7c/0x8c)
[<c02a9d58>] (SyS_ioctl) from [<c0108800>] (ret_fast_syscall+0x0/0x48)

Change-Id: I7e94ea05334693b6e9bfcc2400c9f7f3ff26736e
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
drivers/staging/android/ion/ion_system_heap.c