Re: [PATCH V2] mm/cma: cma_declare_contiguous: correct err handling

2019-02-27 Thread Mike Rapoport
On Wed, Feb 27, 2019 at 02:34:55PM +, Peng Fan wrote: > In case cma_init_reserved_mem failed, need to free the memblock allocated > by memblock_reserve or memblock_alloc_range. > > Quote Catalin's comments: > https://lkml.org/lkml/2019/2/26/482 > Kmemleak is supposed to work with the

[PATCH V2] mm/cma: cma_declare_contiguous: correct err handling

2019-02-27 Thread Peng Fan
In case cma_init_reserved_mem failed, need to free the memblock allocated by memblock_reserve or memblock_alloc_range. Quote Catalin's comments: https://lkml.org/lkml/2019/2/26/482 Kmemleak is supposed to work with the memblock_{alloc,free} pair and it ignores the memblock_reserve() as a