Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1781819rdb; Sun, 24 Dec 2023 01:20:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjJcZE78RVR2exEZHFtY+y+1iMZ8J6gN9V4omtTH7YkP+Sk+Kt5Q5Y94SqbKs4cAE6/vDe X-Received: by 2002:a05:622a:11d1:b0:425:4043:8d49 with SMTP id n17-20020a05622a11d100b0042540438d49mr4561647qtk.100.1703409630810; Sun, 24 Dec 2023 01:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703409630; cv=none; d=google.com; s=arc-20160816; b=N8u295CSBtqoAU7HnOCb8whryRN428NFImq/fbDKeKZJBDCuVqbptpnsF8Haf2x3/t XlUch9lLgOyL0ZPVX0KJHy2UdHzCthpTj7xtPTDp5xkkKtDUYgRId2EeWVo6hbWd7vzE 2iRbjerWtgMDfjpQHJPMx8CU8DgcX2Jxu2MpmXruPk+witkl5x4ImSnxQLLcw8tVsf5p tShtCA6DSwtoa1jehOpXzDjCqVEQkZI+nnpOpI2LmPIZo479Zm2BjPGkGvSUHuxiA/A8 qCmaecUpRjqU7iFEonfju7KbEBbSCh4BfclRL+LWBhy4Sc3CoEY0Fyz7f16Z44T90F1n B/Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=xSkOJi8ry9ZTYt2xcYSgrVPLNV8aUnqjNEMR3Z4sMIw=; fh=ISl+wxe2mGHuvE1p0ZLQyUlsD3yrGnKejSkznkWYVmk=; b=t2rP/DySax5Vb3nGUboIL25KIXDM0kKu9Qfdnb283qQynKqrTIqeIvPr/VC/l27T7t wJRgTxavE8gGge6Hf9/DFmsYOhB39QjEAOeo5sjDHA7C0MU4GBaXR2m17qkm+6jxa5r+ Gi7CWmKBZR2wHW3RiWkS4jtWdLnA5mdO8Qs5dbowJeYdlO/MJIhCX2lOlBgZG8ch/x1B GXS8vqNwLneLhTJIwq91c+bP9tU3H8IhtX684Q/bIG9Gsy1eyAr+XarkMt4VIqJInWtN cw6BRYOLKp+kW6oeMgp5GoZpW3XZ7op4efSJtbuUUmUT9NsQr59xSdYAN81uI86JK79d UZYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=pnTr8Wc6; spf=pass (google.com: domain of linux-kernel+bounces-10677-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10677-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k3-20020ac85fc3000000b0042585815311si8445636qta.596.2023.12.24.01.20.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 01:20:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10677-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=pnTr8Wc6; spf=pass (google.com: domain of linux-kernel+bounces-10677-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10677-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8775B1C21285 for ; Sun, 24 Dec 2023 09:20:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B7BB20F9; Sun, 24 Dec 2023 09:20:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="pnTr8Wc6" X-Original-To: linux-kernel@vger.kernel.org Received: from out203-205-251-82.mail.qq.com (out203-205-251-82.mail.qq.com [203.205.251.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BC8220F8 for ; Sun, 24 Dec 2023 09:20:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1703409611; bh=xSkOJi8ry9ZTYt2xcYSgrVPLNV8aUnqjNEMR3Z4sMIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pnTr8Wc6SgbPLO3GCL6NG4azBRzWyBkr+sdahNYWMeeedPVtxVckRjYyeXVzsdEgK otWlWL0qK3S9FCpmolEPYc5rTETRUoqxUSHBlcsDY378RKbk9n8gcP+MkqHqVzJNmj OKmmJze/sVJvajxOHCZYB0xh0c1vVAqapk3rsPxg= Received: from pek-lxu-l1.wrs.com ([111.198.225.215]) by newxmesmtplogicsvrszc5-2.qq.com (NewEsmtp) with SMTP id 3882FCB6; Sun, 24 Dec 2023 17:14:08 +0800 X-QQ-mid: xmsmtpt1703409248t3jgeuqf8 Message-ID: X-QQ-XMAILINFO: OZZSS56D9fAjgcxFUvHYC3GOEhqvwIp5nhxpRi5XAW2Ws8FM2WrcL4jxjRygBO Msorn+TFPQcQWvDWyF1mllTzri+ryOKFqoATXZwBYMOMS6LGV8dD923pxcdT7+OnuUNyXZkmkWq8 np9I5jr4BYaPyqsfYLdA3ha57V27eP5j4B695AR8x6HDi6IHhUK2KfdmDxf0y9Q5UnfWigGCBa17 Jg4qENlTZRWH7CqxW29mu00i2s3INxjWdpCjypDCdKHO+x2nVU6a/tntaqQEbgtv6r/pRQo80vLI S01ycE4toIfIJmzNSPW4yI33x/6RKTguYKY5P1i90jJG4OxXHZIoGePA08H7Ko/Suhh/Iwjgfwvw adbPHGZXXcL3kRSGzaHKmt8jPPZZIBQWM/kS+W6BYFKczoU63DAzABfvxTXmjCFWiqIQB86WDXb0 qq+MPB134sjIaUk6Npgo4eCrHKT/RUohkNrMQP0ouh10cLg8TDkTMOTz9jiKkD/lYvhO0fF8q2/t LhmbkfqeLcujF+aX1EvzxZzvXSO/wIjXsRumAJsSQQtv8SB7xXCwQFER3YznOt9iqIoxUo7JRvRx dD7WE50r99TFEnplOtBSLlqK9WMLQlO+jBax+xMjTYblGRqoIs7pwjMNhNAEVI5MC+B0/8B8caIv EIXFSJJHzL2/p4GeVyou3RRyIfNZ58cIDA5IUAiP8Gb6nE1u3ar2QmUZIhquwCsHisN4MzPGFhzf utX2f/ZQj+/ygvY8g/B9xzXUbv+8StjlM0nEapINlAiUg0LzMqfj882BNA3/ae/HkhXoA45dBR47 9J5lmGPalqLU9AMN3lcVkf72OzO2+NaE1ylU+9iDfKugtLYsOgon6uj/HFuZrFic9FCq4jDnOmAo Xs+AiB+E/u/GhE3yVPQmp14DvaF0vOp7n7bhF8Lc4dOp5wnZuInL40XQzOidbH0l9GyzWtDCiL X-QQ-XMRINFO: OWPUhxQsoeAVDbp3OJHYyFg= From: Edward Adam Davis To: syzbot+2c4a3b922a860084cc7f@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [ext4?] WARNING in lock_two_nondirectories Date: Sun, 24 Dec 2023 17:14:09 +0800 X-OQ-MSGID: <20231224091408.3559876-2-eadavis@qq.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <000000000000e17185060c8caaad@google.com> References: <000000000000e17185060c8caaad@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit please test WARNING in lock_two_nondirectories #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a39b6ac3781d diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 61277f7f8722..692376f3ce0a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4710,6 +4710,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, } inode = iget_locked(sb, ino); + printk("ino: %u, in: %p, %s\n", ino, inode, __func__); if (!inode) return ERR_PTR(-ENOMEM); if (!(inode->i_state & I_NEW)) { @@ -4944,8 +4945,13 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, inode->i_fop = &ext4_file_operations; ext4_set_aops(inode); } else if (S_ISDIR(inode->i_mode)) { - inode->i_op = &ext4_dir_inode_operations; - inode->i_fop = &ext4_dir_operations; + printk("i: %p, %s\n", inode, __func__); + if (ino == EXT4_BOOT_LOADER_INO) + make_bad_inode(inode); + else { + inode->i_op = &ext4_dir_inode_operations; + inode->i_fop = &ext4_dir_operations; + } } else if (S_ISLNK(inode->i_mode)) { /* VFS does not allow setting these so must be corruption */ if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) {