All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mm: Fix __dump_page when mapping->host is not set
@ 2019-03-18  7:29 Oscar Salvador
  2019-03-19 19:21   ` Hugh Dickins
  0 siblings, 1 reply; 3+ messages in thread
From: Oscar Salvador @ 2019-03-18  7:29 UTC (permalink / raw)
  To: akpm
  Cc: mhocko, anshuman.khandual, william.kucharski, hughd, jack,
	linux-mm, linux-kernel, Oscar Salvador

Swap mapping->host is NULL, so let us protect __dump_page() for such cases.

Fixes: 1c6fb1d89e73c ("mm: print more information about mapping in __dump_page")
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
---
 mm/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/debug.c b/mm/debug.c
index c0b31b6c3877..7759f12a8fbb 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -79,7 +79,7 @@ void __dump_page(struct page *page, const char *reason)
 		pr_warn("ksm ");
 	else if (mapping) {
 		pr_warn("%ps ", mapping->a_ops);
-		if (mapping->host->i_dentry.first) {
+		if (mapping->host && mapping->host->i_dentry.first) {
 			struct dentry *dentry;
 			dentry = container_of(mapping->host->i_dentry.first, struct dentry, d_u.d_alias);
 			pr_warn("name:\"%pd\" ", dentry);
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-19 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18  7:29 [PATCH v2] mm: Fix __dump_page when mapping->host is not set Oscar Salvador
2019-03-19 19:21 ` Hugh Dickins
2019-03-19 19:21   ` Hugh Dickins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.