Skip to contentSkip to conversation

missing NULL pointer check in pte_alloc_one.

PATCH Martin Schwidefsky 1 participant 1 message Apr 7, 2004 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

Hi Andrew,
stupid cut-copy-paste error. I fixed the problem for alpha and sparc64 but I broke s390. pte_alloc_one shouldn't allocate two pages, return one and forget the other without freeing it...

blue skies,
Martin.

include/asm-s390/pgalloc.h +1 -1
diff -urN linux-2.6/include/asm-s390/pgalloc.h linux-2.6-pgalloc/include/asm-s390/pgalloc.h
@@ -141,7 +141,7 @@
 {
 	pte_t *pte = pte_alloc_one_kernel(mm, vmaddr);
 	if (pte)
-		return virt_to_page(pte_alloc_one_kernel(mm, vmaddr));
+		return virt_to_page(pte);
 	return 0;
 }