Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5038973pxb; Mon, 15 Feb 2021 08:01:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfrsEemoQVKUuKPzgu2t/OkFiutzNEn0h1kbGXh/fbtwpdubxdRdOi4UYghGm1GL/6ppIG X-Received: by 2002:aa7:c944:: with SMTP id h4mr16178165edt.233.1613404865148; Mon, 15 Feb 2021 08:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404865; cv=none; d=google.com; s=arc-20160816; b=Wa8uCS5eXwgt2Yl9wnsB2CwRxf6Qn1y95xo0hA27zRM7qXFNKuLSvRqr4x9H9zNnYD XXThWyoT2JciemTTspaQN7hlCFBBVL295njBEcLOp4BhttD8Tt6n+j3ORElBRGHcNY6N zKl6Ardfy2z9BdNJHdrx9Yigfa97nFQeKgWVapNVAGgQ2Tze4p72W+/zu6DZdLooxmiN NlXPfvEj/11v7WdUIuAUIbf+QYXhk3mcFh+PZI8WDAKGluXMTjfCreeaIhHwmRFIuC1A T1lZmm3rMyMfu2JEyl3i9ITXiXTTyrW/fdF0ESnZ/Q5iJb+ELKjw6AUr929fhhP61dNO bwIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4dB5nMo+9YEy9V01uQQ5nPHXdl6v6NLL5DGoQHwpIEs=; b=p3eOMGEkPrmnkmlwu2w680m16BRRQ9JNETZdquuDxpvFsLUVUp0uPt96Ao+UI4cFqu O7dtY9WSarzxtiBbnXI+iddKB/BHvR5uqULAMu/7nD/xJh2ylYL2CWi9j3hWc5givNil hYbnW8lHyR+O6ppaxSCtYCBbOYyQfhm8x1TwzpyYyPnV2paZqBFy1azAyCm/yDYRjuL+ IDr40vIQ0SEJpYrIVFRaDY4XsoAAasaoNjOY453G7mJ9qsAe33qDeaqIp0x7U19QyrRi zqFgkrrNdir5FURxP8/pfC+CGmVWsC2FLwt/x/08yyTjIFfZiR8ANx+lirMaQm6fIGDL CQLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S8uclLVF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id he44si11878239ejc.386.2021.02.15.08.00.41; Mon, 15 Feb 2021 08:01:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S8uclLVF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232636AbhBOP7a (ORCPT + 99 others); Mon, 15 Feb 2021 10:59:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:46844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbhBOPdE (ORCPT ); Mon, 15 Feb 2021 10:33:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D7BC764EB6; Mon, 15 Feb 2021 15:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403025; bh=3nh+QiYmUMSitgBwXEnFguLJUlFGGPN6t8DLeVwDXX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S8uclLVFlwaKuvgPITAF4EO0yFugZwb1ClrvTttOP6N8gbaVAEOmRsOABI+JhiMoH tP04XHHk1hwiEIHVRBvVSEAO42Vw2NOlBtaJh/qP3Mzes+BGe7Gko53qCMBaN/Bh3x 1xROvx/U4+uIjKDyHbT9yJgVIfCEvnrbVJLrmj3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miklos Szeredi Subject: [PATCH 5.4 60/60] ovl: expand warning in ovl_d_real() Date: Mon, 15 Feb 2021 16:27:48 +0100 Message-Id: <20210215152717.305663473@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152715.401453874@linuxfoundation.org> References: <20210215152715.401453874@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miklos Szeredi commit cef4cbff06fbc3be54d6d79ee139edecc2ee8598 upstream. There was a syzbot report with this warning but insufficient information... Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- fs/overlayfs/super.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -79,7 +79,7 @@ static void ovl_dentry_release(struct de static struct dentry *ovl_d_real(struct dentry *dentry, const struct inode *inode) { - struct dentry *real; + struct dentry *real = NULL, *lower; /* It's an overlay file */ if (inode && d_inode(dentry) == inode) @@ -98,9 +98,10 @@ static struct dentry *ovl_d_real(struct if (real && !inode && ovl_has_upperdata(d_inode(dentry))) return real; - real = ovl_dentry_lowerdata(dentry); - if (!real) + lower = ovl_dentry_lowerdata(dentry); + if (!lower) goto bug; + real = lower; /* Handle recursion */ real = d_real(real, inode); @@ -108,8 +109,10 @@ static struct dentry *ovl_d_real(struct if (!inode || inode == d_inode(real)) return real; bug: - WARN(1, "ovl_d_real(%pd4, %s:%lu): real dentry not found\n", dentry, - inode ? inode->i_sb->s_id : "NULL", inode ? inode->i_ino : 0); + WARN(1, "%s(%pd4, %s:%lu): real dentry (%p/%lu) not found\n", + __func__, dentry, inode ? inode->i_sb->s_id : "NULL", + inode ? inode->i_ino : 0, real, + real && d_inode(real) ? d_inode(real)->i_ino : 0); return dentry; }