[to-be-updated] mm-cma-support-sysfs-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: cma: fix potential null dereference on pointer cma
has been removed from the -mm tree.  Its filename was
     mm-cma-support-sysfs-fix.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Subject: mm: cma: fix potential null dereference on pointer cma

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
cma_sysfs_fail_pages_count if cma is not null.

Addresses-Coverity: ("Dereference after null check")

Link: https://lkml.kernel.org/r/20210316100433.17665-1-colin.king@xxxxxxxxxxxxx
Fixes: dc4764f7e9ac ("mm: cma: support sysfs")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Acked-by: Minchan Kim <minchan@xxxxxxxxxx>
Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/cma.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/cma.c~mm-cma-support-sysfs-fix
+++ a/mm/cma.c
@@ -512,7 +512,8 @@ out:
 		cma_sysfs_alloc_pages_count(cma, count);
 	} else {
 		count_vm_event(CMA_ALLOC_FAIL);
-		cma_sysfs_fail_pages_count(cma, count);
+		if (cma)
+			cma_sysfs_fail_pages_count(cma, count);
 	}
 
 	return page;
_

Patches currently in -mm which might be from colin.king@xxxxxxxxxxxxx are

mm-vmalloc-hugepage-vmalloc-mappings-fix.patch
proc-fix-incorrect-pde_is_permanent-check.patch
mm-slab-fix-spelling-mistake-disired-desired.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux