Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5075690pxb; Mon, 15 Feb 2021 08:52:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxG+ia9404S+lP9jedBE1WGNLtvrP+AYutjhQ81UmuNq01pmrSgICGAg2mwQ7NgvtzWZra9 X-Received: by 2002:a17:906:a898:: with SMTP id ha24mr17241596ejb.413.1613407978898; Mon, 15 Feb 2021 08:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613407978; cv=none; d=google.com; s=arc-20160816; b=YJ5O7SRrCumk2W66bIILCRCesBc3FbxsZH209kTqZmEvw2hGPRPfBKz1XKlnQZFnYd 4xI+crMpGCaIdfMsZBdbSZU4mtWkJNC51VnYqrJ/sp623U/jf0mXdoXasDt+fbdCssSK GtWvuadY7Iu0engbEGQobUk+EHCLrOOH34IIU0EdSwDGtLO/2Z8ROdmLwPe4cR/e3RU2 M4ETy4MqLGcvY2eV77t+/wbiqzYdSQ88ljPuZepMKyB66MTU5rGPmodtiLlCHaBX+mCR zun2fHRkzp62ZKpcxFs2i2jszb1VHzh6iYubuVph96/Unqumlf/OtfD3BuB+I69SMXBe icaw== 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=z29XBAK6JIibGi6c0r3hG1WFSi/GS5wWdZWnjUU9cfyX7RnTFIYCVhYqp9edsRLcSk T0j2RhFdJprsmJ5ooPx1G2PCbxA+f4i9Nsh2iXxsYufVCmiN+MWrmyHcsR/qo+tQqqlE h6sFLRlgJop+9EUv7zzY/xoONkRU1k85EAWCyy+u7cMzqsOzzMkf15jsREKp38YisVF7 hZ+MLuFChkgZQ6cobhUxPo0W90ByRkZvNfCwJ0/2roAOPvDm3ElFFjAwgL1qNDvOymEc lw/kKF2rT5mKwqDCSoNCGMNllquXJHvirssBkr8AXp5ZlaJtM7QmOKVKbcouN/vabZhx AqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MFYwuEjI; 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 jw10si9393150ejc.357.2021.02.15.08.52.35; Mon, 15 Feb 2021 08:52:58 -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=MFYwuEjI; 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 S231233AbhBOQvw (ORCPT + 99 others); Mon, 15 Feb 2021 11:51:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:50182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbhBOPlu (ORCPT ); Mon, 15 Feb 2021 10:41:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D9C764E51; Mon, 15 Feb 2021 15:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403300; bh=3nh+QiYmUMSitgBwXEnFguLJUlFGGPN6t8DLeVwDXX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MFYwuEjIRsQlB3N5Z8BSyQkCSGqe5ZRhh3dBTGw4w6whsfEH50GXqc5b4WzN43lZy irpZ198C4KpP7sKB7dv5bEHinblQysQsCouYkZynZJ112rWXbMF/nN4gUfAkOpt3+U XJpxLoedWjKwBLC3PbGvRCn1JWaIlSux/yJJLOVI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miklos Szeredi Subject: [PATCH 5.10 103/104] ovl: expand warning in ovl_d_real() Date: Mon, 15 Feb 2021 16:27:56 +0100 Message-Id: <20210215152722.792877588@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@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; }