[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0000000000008d43b1061f3c08c7@google.com>
Date: Fri, 09 Aug 2024 01:36:02 -0700
From: syzbot <syzbot+0b74d367d6e80661d6df@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [v9fs?] WARNING in v9fs_begin_writeback
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [syzbot] [v9fs?] WARNING in v9fs_begin_writeback
Author: lizhi.xu@...driver.com
add file refconut when add fid to list
#syz test: upstream c0ecd6388360
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index de009a33e0e2..b7016e148f48 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>
+#include <linux/file.h>
#include "v9fs.h"
#include "v9fs_vfs.h"
@@ -95,6 +96,7 @@ void v9fs_open_fid_add(struct inode *inode, struct p9_fid **pfid)
struct p9_fid *fid = *pfid;
spin_lock(&inode->i_lock);
+ fget(fid->fid);
hlist_add_head(&fid->ilist, (struct hlist_head *)&inode->i_private);
spin_unlock(&inode->i_lock);
Powered by blists - more mailing lists