The patch titled Subject: mm: debug: Fix a width vs precision bug in printk has been added to the -mm tree. Its filename is mm-print-more-information-about-mapping-in-__dump_page-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-print-more-information-about-mapping-in-__dump_page-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-print-more-information-about-mapping-in-__dump_page-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Subject: mm: debug: Fix a width vs precision bug in printk We had intended to only print dentry->d_name.len characters but there is a width vs precision typo so if the name isn't NUL terminated it will read past the end of the buffer. Link: http://lkml.kernel.org/r/20181123072135.gqvblm2vdujbvfjs@kili.mountain Fixes: 408ddbc22be3 ("mm: print more information about mapping in __dump_page") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/debug.c~mm-print-more-information-about-mapping-in-__dump_page-fix +++ a/mm/debug.c @@ -80,7 +80,7 @@ void __dump_page(struct page *page, cons if (mapping->host->i_dentry.first) { struct dentry *dentry; dentry = container_of(mapping->host->i_dentry.first, struct dentry, d_u.d_alias); - pr_emerg("name:\"%*s\" ", dentry->d_name.len, dentry->d_name.name); + pr_emerg("name:\"%.*s\" ", dentry->d_name.len, dentry->d_name.name); } } BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1); _ Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are mm-print-more-information-about-mapping-in-__dump_page-fix.patch