Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1654459img; Tue, 19 Mar 2019 12:23:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlwGn3NDopk/NLai0pcPTcfwpgORtg/B6hL75NdPADnDwNDpbHNdkLljFaSADaSQ6Ixz2W X-Received: by 2002:a65:5184:: with SMTP id h4mr3366624pgq.32.1553023414867; Tue, 19 Mar 2019 12:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553023414; cv=none; d=google.com; s=arc-20160816; b=uXSlGklVTJ3jTQ7FgjOiFnQ7No1IC9m2YT+d1Fl+5/S736t0iIEMSudauTQlPJi6S+ Xqhfa59wX27dfHFtwzgFvDgkfC1UlmyozNJ/mKSwA+96iqkZUMFJggDOZzMhBkvp77QV WViMxHiF5Qeoi5sZxLMiV06ZtACa5nOzh8qbQe1klyXycwVEtUCotcNS7zb5vd23+GFF 4olheR5ljw9i1t7F5dl0RjKF3z57PYrdN29Z7N6uaUnyzEJ1/TO5VmT2BaG4/3f4Z5bE J69Friu9LCkrvNxOw5Ts4+8EuPMMxaHtG1wZPYaswP8EzCXD9+ilsbYFtWhTqHKByysI 9iTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=LsViNz3EuXSVXAyDl+lEov/0/hqmOHSRj7WYM60oPCc=; b=ehS4AbA1oyfAJnJZQ3G8kSxwxbMtotMTNMJY6QBua4LNMD/5LUtnMoNYDW2ZFwPlxE IxArW46X6mDvecAjT4BIxKxZlNVcD42LEoU9s5SNPN2hRg9QzCSwryXA2fJtbw5SXqVk ivr6Dn7YTMFYBYJYo+wDSxK2axPww4F/9ny+e4apX/Sdyj0qIp8cZldWME/iiYdYR5mH McQMw8gN9bSQOtZ47e84z1b58gzyk2eUKsEg1GXcow/3kUbal7rMcw/5aT4lBzUaRuIP Cucp5FWKtTiaDeJQ1CJLd0os/3op8TEDCS3OePvyANKQHlcoOja9v48ABm9VjIIjeQ7i soYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CE2GKuJp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si11660818pgu.224.2019.03.19.12.23.19; Tue, 19 Mar 2019 12:23:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CE2GKuJp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727183AbfCSTWf (ORCPT + 99 others); Tue, 19 Mar 2019 15:22:35 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38019 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726612AbfCSTWf (ORCPT ); Tue, 19 Mar 2019 15:22:35 -0400 Received: by mail-pg1-f194.google.com with SMTP id v1so9817708pgi.5 for ; Tue, 19 Mar 2019 12:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=LsViNz3EuXSVXAyDl+lEov/0/hqmOHSRj7WYM60oPCc=; b=CE2GKuJpTbcy2TUHrTiiun8dDGL1rW45+DZMmrEGD4r6ZJgZlAa36cOuBA2NbzQ9L3 S42b64WR+Z5PF5A0L09qsSTSiTJBHaFINH+sFjo1+mcDWMrNdfF1hJIzEwNyxL+QLbJy X5dyz8pIrBH5e72nhnIMr0CJsdm7xf9Qj+XyHH16T2rR3xh0GIkllGo0s8k8zzAk9CmY EszVjc8X2HTXOJhUrWDcn3HjZwX1iDftEqOayG7kXVaeLnTCCZ1y1xtU9uc/XWLp495+ Vu+CzxgpKsSmuRdnzra6ClSuVmRW944auQDAEN4p8Com+YxwrwjmZa014ddbKkiQ6ZOR vM7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=LsViNz3EuXSVXAyDl+lEov/0/hqmOHSRj7WYM60oPCc=; b=AzC/jfx3yW4yFgZXYpBE6NQlZCAWZ2mb0W43IfwuIRjDqNRuW9bVi6KhPwMZQjRG4h vyUVjpMqfqSnrEONs5thIVKhg0FQBeZxdWsQOrxJLJvNQQ4B/vSCZNmY6dZXakGKBQLn NQufYygTnTEJhGlGOujpLdoAdqhb6YV6PASscunbXCfIIkUJ+3lrGINzbbh2l4SqWqS4 SHVMxMkt3z1EIQ39LqiciRjSfElBcsk4SSxMw8/jGsEN3EnRCw4R2c6c17uiY7+ks88i fwX5AhpQyOqbuAe0pQrTftjQOOuxa5kKxFsOW+XaIdc4F8bizKXrUs00dQT9FVlghbmz hfTQ== X-Gm-Message-State: APjAAAW2aosB4YUljUP6SX2GbPkiHcVx5bZSBzkDY65mbTNN0fE1kCaP TX9Xk+/Oveb1cOqdO0jLZLvWVQ== X-Received: by 2002:a17:902:8b83:: with SMTP id ay3mr3754394plb.1.1553023354294; Tue, 19 Mar 2019 12:22:34 -0700 (PDT) Received: from [100.112.89.103] ([104.133.8.103]) by smtp.gmail.com with ESMTPSA id m13sm26742042pff.175.2019.03.19.12.22.32 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Mar 2019 12:22:33 -0700 (PDT) Date: Tue, 19 Mar 2019 12:21:51 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Oscar Salvador cc: akpm@linux-foundation.org, mhocko@suse.com, anshuman.khandual@arm.com, william.kucharski@oracle.com, hughd@google.com, jack@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: Fix __dump_page when mapping->host is not set In-Reply-To: <20190318072931.29094-1-osalvador@suse.de> Message-ID: References: <20190318072931.29094-1-osalvador@suse.de> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Mar 2019, Oscar Salvador wrote: > Swap mapping->host is NULL, so let us protect __dump_page() for such cases. Thanks :) > > Fixes: 1c6fb1d89e73c ("mm: print more information about mapping in __dump_page") > Signed-off-by: Oscar Salvador > Acked-by: Michal Hocko Acked-by: Hugh Dickins Cc: stable@vger.kernel.org > --- > 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