From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B2B136F8EF for ; Fri, 24 Jul 2026 11:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784894033; cv=none; b=rPML/1Ml7DpU4DaWr5/FSrU0MfqRLattWkSTZrDC20ulHQSMgvOCY7h6iYZoCSZLf5xWlCJum/tKNokja3/aBAlTb4RXYs5kGHrlTqTUsmRLz/EEz0Pa/kJTsIVc8ilPidblShWTjCCIlgnWXA1BzBrBgEhOZ+MflyC8xLIV+TY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784894033; c=relaxed/simple; bh=roPzLxli9JFLfzcK60bb34WuTlhWvazYjzNgojyf5dA=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=B/5VtHeBuXRFU0UQa6pZrNZScyU8ieOXMzNL1VJxRqvGgh5bOiQFkNIiDNLUIoATAgGXeP2JFj2i/fvQpWUdEDFxSy68wtEmOx3sD506vtgnm16d/MxvJc5XqMlexVpvHLg/bHjExtPuypffJhv7hxzo0xEnyhLv7JKzDu+zs0Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.167.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f199.google.com with SMTP id 5614622812f47-4a41e3d6fe9so344057b6e.2 for ; Fri, 24 Jul 2026 04:53:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784894030; x=1785498830; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Eg9fDVWNCpTVIp/kVZGtXd5HjikNnV7lehlzGW1BA0k=; b=QfWzSR589JPLbGTBCns0O0heLgI6pFo1F4/56e86DvB/GynnYkcFDFrAi8ggip1597 UP0+WwUh2UehdjVni78sDKtOaGW1p4wMhZ6FUztXJ883CLs4A2cX+1Jpq+IF1stYUg8m sHS4A9jKLhDQA7y0VMzufwqYEWOURP40ogelhF8iIRPVb6RtO4Kg2W+pIlQqxvWl0+Je aeXFmkv9GiUxr7IRcvEWFue0d2zPczxLi8aZkikdZmx/n3gFFIFA8R2v00BSwrn3Sz90 w3Dc78eU9zsY4wSxeFfbly2ApHb+yveLaRUZEqpZBZ7oNJM6ZY22fNqw+aHRNqha0oy7 Og7A== X-Gm-Message-State: AOJu0YzjJJ2/q2V232YJg7X5UUMLCg8CEjo3AO6N6lfANycWBTbetvE+ PDiSbQGyN17QPt9LrRIJvECRarMiOi6kNW/q+F/5384OqTE2fnXXlUviKuGYU1ASmkkIpOuSAv4 0KdSzWitl/UP0rexyAyrwjN+pvyjxOVneO3D1hx7G8sUHU7O8Zs8tVO3X86k= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6808:1513:b0:4a3:d383:b3ea with SMTP id 5614622812f47-4ab35404407mr4009042b6e.27.1784894030260; Fri, 24 Jul 2026 04:53:50 -0700 (PDT) Date: Fri, 24 Jul 2026 04:53:50 -0700 In-Reply-To: <6a62f788.dde6c935.cf6c8.000e.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a63524e.dde6c935.cf6c8.001e.GAE@google.com> Subject: Forwarded: [PATCH] 9p: add DIAG WARN_ONCE sites to disambiguate v9fs_init_request no_fid failures From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] 9p: add DIAG WARN_ONCE sites to disambiguate v9fs_init_request no_fid failures Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master v9fs_init_request() funnels four different failure modes into a single shared WARN_ONCE("folio expected an open fid ...") message, making it impossible to tell from a crash report which one actually fired. Split each site out with its own message (and the errno for the v9fs_fid_lookup() case) to identify the exact cause of the syzbot-reported "WARNING in v9fs_init_request (2)". Diagnostic only, not a functional fix. Reported-by: syzbot+344c09c64fcd8d3d2782@syzkaller.appspotmail.com Signed-off-by: Deepanshu Kartikey --- fs/9p/vfs_addr.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c index 1ac0b3dcc077..fc05bd963506 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c @@ -136,21 +136,37 @@ static int v9fs_init_request(struct netfs_io_request *rreq, struct file *file) if (file) { fid = file->private_data; - if (!fid) - goto no_fid; + if (!fid) { + WARN_ONCE(1, "DIAG: v9fs_init_request: file has no fid, " + "inode->i_ino=%llx\n", rreq->inode->i_ino); + return -EINVAL; + } p9_fid_get(fid); } else if (S_ISLNK(rreq->inode->i_mode)) { dentry = d_find_any_alias(rreq->inode); - if (!dentry) - goto no_fid; + if (!dentry) { + WARN_ONCE(1, "DIAG: v9fs_init_request: symlink inode has no " + "dentry alias, inode->i_ino=%llx\n", + rreq->inode->i_ino); + return -EINVAL; + } fid = v9fs_fid_lookup(dentry); + if (IS_ERR(fid)) { + WARN_ONCE(1, "DIAG: v9fs_init_request: v9fs_fid_lookup failed " + "for symlink, err=%ld dentry=%pd4 inode->i_ino=%llx\n", + PTR_ERR(fid), dentry, rreq->inode->i_ino); + dput(dentry); + return PTR_ERR(fid); + } dput(dentry); - if (IS_ERR(fid)) - goto no_fid; } else { fid = v9fs_fid_find_inode(rreq->inode, writing, INVALID_UID, true); - if (!fid) - goto no_fid; + if (!fid) { + WARN_ONCE(1, "DIAG: v9fs_init_request: non-symlink inode has " + "no open/writeback fid, inode->i_ino=%llx\n", + rreq->inode->i_ino); + return -EINVAL; + } } rreq->wsize = fid->clnt->msize - P9_IOHDRSZ; @@ -163,11 +179,6 @@ static int v9fs_init_request(struct netfs_io_request *rreq, struct file *file) WARN_ON(rreq->origin == NETFS_READ_FOR_WRITE && !(fid->mode & P9_ORDWR)); rreq->netfs_priv = fid; return 0; - -no_fid: - WARN_ONCE(1, "folio expected an open fid inode->i_ino=%llx\n", - rreq->inode->i_ino); - return -EINVAL; } /** -- 2.43.0