]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/cma.c: fix crash on CMA allocation if bitmap allocation fails
authorYue Hu <huyue2@yulong.com>
Tue, 14 May 2019 00:18:14 +0000 (17:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:54:01 +0000 (11:54 +0200)
commite5f8857ea972ef84a27a7990989d3388bc2d09c9
tree8dca2b4c3549d45fe25b55af241449c10bc7b6f5
parent5094a85d6d930beeb023e1185b94ae00ba2c3f47
mm/cma.c: fix crash on CMA allocation if bitmap allocation fails

[ Upstream commit 1df3a339074e31db95c4790ea9236874b13ccd87 ]

f022d8cb7ec7 ("mm: cma: Don't crash on allocation if CMA area can't be
activated") fixes the crash issue when activation fails via setting
cma->count as 0, same logic exists if bitmap allocation fails.

Link: http://lkml.kernel.org/r/20190325081309.6004-1-zbestahu@gmail.com
Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
mm/cma.c