mm/cma.c: fix NULL pointer dereference when cma could not be activated
mainline inclusion from mainline-v5.9-rc1 commit 835832ba category: bugfix bugzilla: 41397 CVE: NA ------------------------------------------------- In some case the cma area could not be activated, but the cma_alloc be used under this case, then the kernel will crash caused by NULL pointer dereference. Add bitmap valid check in cma_alloc to avoid this issue. Signed-off-by:Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Link: http://lkml.kernel.org/r/20200615010123.15596-1-jay.xu@rock-chips.com Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by:
Liu Shixin <liushixin2@huawei.com> Reviewed-by:
Chen Wandun <chenwandun@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment