Mikael Levernes Valen-Sendstad <levernes@xxxxxxxxxxxx> writes: > Thanks. > > Is this code safe?: Hi. The code in mm/memory.c:follow_page checks the return values of the page table macros. Your code doesn't do that, so I'd expect you to panic on a null pointer dereference ... unless you're 100% sure that all the pages in the area are guaranteed to be present and to have all three PT levels present. ... > pgd = pgd_offset(current->mm, page_addr); > pmd = pmd_offset(pgd, page_addr); > pte = pte_offset(pmd, page_addr); > page = pte_page(*pte); -- Ed L Cashin <ecashin@xxxxxxxxxx> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/