Re: [PATCH V4] mm: fix kernel crash in khugepaged thread

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

 



> 
> Instead of the condition, we could have:
> 
> 	__entry->pfn = page ? page_to_pfn(page) : -1;
> 
> 
> But if there's no reason to do the tracepoint if page is NULL, then
> this patch is fine. I'm just throwing out this idea.
> 
we trace only if page is valid

--- linux-next/mm/huge_memory.c	Fri Nov 13 16:00:22 2015
+++ b/mm/huge_memory.c	Fri Nov 13 16:26:19 2015
@@ -1987,7 +1987,8 @@ static int __collapse_huge_page_isolate(
 
 out:
 	release_pte_pages(pte, _pte);
-	trace_mm_collapse_huge_page_isolate(page_to_pfn(page), none_or_zero,
+	if (page)
+		trace_mm_collapse_huge_page_isolate(page_to_pfn(page), none_or_zero,
 					    referenced, writable, result);
 	return 0;
 }
--



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]