ion: fix cma alloc bug
authorHuang, Tao <huangtao@rock-chips.com>
Fri, 26 Dec 2014 15:08:20 +0000 (23:08 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 26 Dec 2014 15:08:20 +0000 (23:08 +0800)
commit679585fe2da9fde2b5e339a2c9886b45208b02b7
tree878bbd3bea247b2bfd6c8d62b8535d2ead37113d
parentccddaafdb0ee495441374d863082c6d1df0f8195
ion: fix cma alloc bug

Fix this bug on ARM64:
BUG: failure at mm/slub.c:1351/new_slab()!
Kernel panic - not syncing: BUG!
CPU: 0 PID: 1596 Comm: Binder_5 Tainted: G           O 3.10.0 #45
Call trace:
[<ffffffc00008807c>] dump_backtrace+0x0/0x144
[<ffffffc0000881d0>] show_stack+0x10/0x1c
[<ffffffc000892838>] dump_stack+0x1c/0x28
[<ffffffc00088ffd0>] panic+0xe4/0x210
[<ffffffc00016673c>] new_slab+0x50/0x248
[<ffffffc000167b60>] __slab_alloc.isra.59.constprop.63+0x1f4/0x2d0
[<ffffffc000167cec>] __kmalloc+0xb0/0x1c4
[<ffffffc000092930>] __dma_alloc_noncoherent+0x7c/0x158
[<ffffffc000643cf0>] ion_cma_allocate+0xfc/0x27c
[<ffffffc0006404f8>] ion_alloc+0x134/0x778
[<ffffffc00064100c>] ion_ioctl+0x15c/0x344
[<ffffffc00017bfa8>] vfs_ioctl+0x20/0x3c
[<ffffffc00017c8ac>] do_vfs_ioctl+0x474/0x540
[<ffffffc00017c9d4>] SyS_ioctl+0x5c/0x88

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
drivers/staging/android/ion/ion_cma_heap.c