From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+0b74d367d6e80661d6df@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [v9fs?] WARNING in v9fs_begin_writeback
Date: Thu, 8 Aug 2024 19:10:02 +0800 [thread overview]
Message-ID: <tencent_1E27F746D652D8C64C49BE6EDBAEEF4CA506@qq.com> (raw)
In-Reply-To: <0000000000007ec511061f00a7b2@google.com>
debug
#syz test: upstream c0ecd6388360
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index de009a33e0e2..a5b716b716d4 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -67,6 +67,7 @@ struct p9_fid *v9fs_fid_find_inode(struct inode *inode, bool want_writeable,
spin_lock(&inode->i_lock);
h = (struct hlist_head *)&inode->i_private;
+ printk("ino: %p, inode fid list is empty: %d, %s\n", inode, hlist_empty(h), __func__);
hlist_for_each_entry(fid, h, ilist) {
if (any || uid_eq(fid->uid, uid)) {
if (want_writeable && !v9fs_is_writeable(fid->mode)) {
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 348cc90bf9c5..0da8ff7f38fb 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -44,6 +44,7 @@ int v9fs_file_open(struct inode *inode, struct file *file)
struct p9_fid *fid;
int omode;
+ printk("1ind: %p, %s\n", inode, __func__);
p9_debug(P9_DEBUG_VFS, "inode: %p file: %p\n", inode, file);
v9ses = v9fs_inode2v9ses(inode);
if (v9fs_proto_dotl(v9ses))
@@ -54,8 +55,10 @@ int v9fs_file_open(struct inode *inode, struct file *file)
fid = file->private_data;
if (!fid) {
fid = v9fs_fid_clone(file_dentry(file));
- if (IS_ERR(fid))
- return PTR_ERR(fid);
+ if (IS_ERR(fid)) {
+ err = PTR_ERR(fid);
+ goto error;
+ }
if ((v9ses->cache & CACHE_WRITEBACK) && (omode & P9_OWRITE)) {
int writeback_omode = (omode & ~P9_OWRITE) | P9_ORDWR;
@@ -72,7 +75,7 @@ int v9fs_file_open(struct inode *inode, struct file *file)
}
if (err < 0) {
p9_fid_put(fid);
- return err;
+ goto error;
}
if ((file->f_flags & O_APPEND) &&
(!v9fs_proto_dotu(v9ses) && !v9fs_proto_dotl(v9ses)))
@@ -87,8 +90,12 @@ int v9fs_file_open(struct inode *inode, struct file *file)
file->f_mode & FMODE_WRITE);
#endif
v9fs_fid_add_modes(fid, v9ses->flags, v9ses->cache, file->f_flags);
+ printk("2ind: %p, %s\n", inode, __func__);
v9fs_open_fid_add(inode, &fid);
return 0;
+error:
+ printk("err: %d, ind: %p, %s\n", err, inode, __func__);
+
}
/**
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index fd72fc38c8f5..29a055f2fe7b 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -738,6 +738,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
struct inode *inode;
int p9_omode;
+ printk("1ind: %p, %s\n", inode, __func__);
if (d_in_lookup(dentry)) {
res = v9fs_vfs_lookup(dir, dentry, 0);
if (IS_ERR(res))
@@ -781,6 +782,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
#endif
v9fs_fid_add_modes(fid, v9ses->flags, v9ses->cache, file->f_flags);
+ printk("2ind: %p, %s\n", inode, __func__);
v9fs_open_fid_add(inode, &fid);
file->f_mode |= FMODE_CREATED;
@@ -789,6 +791,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
return err;
error:
+ printk("err: %d, ind: %p, %s\n", err, inode, __func__);
p9_fid_put(fid);
goto out;
}
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index c61b97bd13b9..3c4c744af0e8 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -194,6 +194,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
struct posix_acl *pacl = NULL, *dacl = NULL;
struct dentry *res = NULL;
+ printk("1ind: %p, %s\n", inode, __func__);
if (d_in_lookup(dentry)) {
res = v9fs_vfs_lookup(dir, dentry, 0);
if (IS_ERR(res))
@@ -284,9 +285,11 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
}
#endif
v9fs_fid_add_modes(ofid, v9ses->flags, v9ses->cache, flags);
+ printk("2ind: %p, %s\n", inode, __func__);
v9fs_open_fid_add(inode, &ofid);
file->f_mode |= FMODE_CREATED;
out:
+ printk("err: %d, ind: %p, %s\n", err, inode, __func__);
p9_fid_put(dfid);
p9_fid_put(ofid);
p9_fid_put(fid);
next prev parent reply other threads:[~2024-08-08 11:15 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 9:45 syzbot
2024-08-06 11:35 ` Edward Adam Davis
2024-08-06 11:56 ` syzbot
2024-08-08 11:10 ` Edward Adam Davis [this message]
2024-08-08 11:24 ` syzbot
2024-08-08 11:44 ` Edward Adam Davis
2024-08-08 12:10 ` syzbot
2024-08-08 13:35 ` Edward Adam Davis
2024-08-08 13:56 ` syzbot
2024-08-08 15:02 ` Edward Adam Davis
2024-08-08 15:23 ` syzbot
2024-08-08 23:22 ` Edward Adam Davis
2024-08-08 23:43 ` syzbot
2024-08-09 1:44 ` [syzbot] " syzbot
2024-08-09 5:48 ` syzbot
2024-08-09 6:41 ` syzbot
2024-08-09 7:41 ` syzbot
2024-08-09 8:15 ` syzbot
2024-08-09 8:36 ` syzbot
2024-08-09 9:20 ` syzbot
2024-08-09 11:24 ` Edward Adam Davis
2024-08-09 11:36 ` syzbot
2024-08-09 12:05 ` Edward Adam Davis
2024-08-09 12:19 ` syzbot
2024-08-09 13:32 ` Edward Adam Davis
2024-08-09 13:53 ` syzbot
2024-08-09 14:52 ` Edward Adam Davis
2024-08-09 15:13 ` syzbot
2024-08-10 0:54 ` Edward Adam Davis
2024-08-10 1:21 ` syzbot
2024-08-10 2:56 ` Edward Adam Davis
2024-08-10 3:10 ` syzbot
2024-08-10 3:36 ` Edward Adam Davis
2024-08-10 4:02 ` syzbot
2024-08-10 4:53 ` Edward Adam Davis
2024-08-10 5:06 ` syzbot
2024-08-10 4:55 ` Edward Adam Davis
2024-08-10 5:29 ` syzbot
2024-08-11 4:49 ` Edward Adam Davis
2024-08-11 5:02 ` syzbot
2024-08-11 6:14 ` Edward Adam Davis
2024-08-11 6:35 ` syzbot
2024-08-11 8:42 ` Edward Adam Davis
2024-08-11 9:13 ` syzbot
2024-08-11 10:18 ` Edward Adam Davis
2024-08-11 10:43 ` syzbot
2024-08-11 11:57 ` Edward Adam Davis
2024-08-11 12:09 ` syzbot
2024-08-11 12:38 ` Edward Adam Davis
2024-08-11 13:04 ` syzbot
2024-08-11 14:05 ` Edward Adam Davis
2024-08-11 14:33 ` syzbot
2024-08-12 10:52 ` Edward Adam Davis
2024-08-12 11:18 ` syzbot
2024-08-13 0:29 ` Edward Adam Davis
2024-08-13 0:57 ` syzbot
2024-08-14 9:26 ` Edward Adam Davis
2024-08-14 9:47 ` syzbot
2024-08-14 10:25 ` Edward Adam Davis
2024-08-14 11:08 ` syzbot
2024-08-15 2:31 ` [syzbot] " syzbot
2024-08-15 3:00 ` syzbot
2024-08-15 8:13 ` syzbot
[not found] <20240809014410.672145-1-lizhi.xu@windriver.com>
2024-08-09 2:04 ` syzbot
[not found] <20240809054850.762409-1-lizhi.xu@windriver.com>
2024-08-09 6:09 ` syzbot
[not found] <20240809064122.1490034-1-lizhi.xu@windriver.com>
2024-08-09 7:01 ` syzbot
[not found] <20240809074103.2196689-1-lizhi.xu@windriver.com>
2024-08-09 8:01 ` syzbot
[not found] <20240809081544.2529127-1-lizhi.xu@windriver.com>
2024-08-09 8:29 ` syzbot
[not found] <20240809083558.2702436-1-lizhi.xu@windriver.com>
2024-08-09 8:56 ` syzbot
[not found] <20240809092004.3109492-1-lizhi.xu@windriver.com>
2024-08-09 9:40 ` syzbot
[not found] <20240815023135.340669-1-lizhi.xu@windriver.com>
2024-08-15 2:50 ` syzbot
[not found] <20240815030030.564798-1-lizhi.xu@windriver.com>
2024-08-15 3:20 ` syzbot
[not found] <20240815081319.3450173-1-lizhi.xu@windriver.com>
2024-08-15 8:34 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_1E27F746D652D8C64C49BE6EDBAEEF4CA506@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+0b74d367d6e80661d6df@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®