Re: [PATCH] mm: cma: Fix potential null dereference on pointer cma

2021-03-17 Thread John Hubbard
On 3/16/21 3:04 AM, Colin King wrote: From: Colin Ian King At the start of the function there is a null pointer check on cma and then branch to error handling label 'out'. The subsequent call to cma_sysfs_fail_pages_count dereferences cma, hence there is a potential null pointer deference

Re: [PATCH] mm: cma: Fix potential null dereference on pointer cma

2021-03-16 Thread Minchan Kim
On Tue, Mar 16, 2021 at 10:04:33AM +, Colin King wrote: > From: Colin Ian King > > At the start of the function there is a null pointer check on cma > and then branch to error handling label 'out'. The subsequent call > to cma_sysfs_fail_pages_count dereferences cma, hence there is a >

[PATCH] mm: cma: Fix potential null dereference on pointer cma

2021-03-16 Thread Colin King
From: Colin Ian King At the start of the function there is a null pointer check on cma and then branch to error handling label 'out'. The subsequent call to cma_sysfs_fail_pages_count dereferences cma, hence there is a potential null pointer deference issue. Fix this by only calling