From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+76a6f18e3af82e84f264@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [afs?] general protection fault in afs_atcell_get_link
Date: Tue, 18 Mar 2025 17:17:14 +0800 [thread overview]
Message-ID: <tencent_DE79B66C942EF56F989538EA7EEC32CD3C0A@qq.com> (raw)
In-Reply-To: <67d92a74.050a0220.2ca2c6.014f.GAE@google.com>
#syz test
diff --git a/fs/afs/dynroot.c b/fs/afs/dynroot.c
index 008698d706ca..7d997f7a8028 100644
--- a/fs/afs/dynroot.c
+++ b/fs/afs/dynroot.c
@@ -314,6 +314,9 @@ static const char *afs_atcell_get_link(struct dentry *dentry, struct inode *inod
const char *name;
bool dotted = vnode->fid.vnode == 3;
+ if (!rcu_access_pointer(net->ws_cell))
+ return ERR_PTR(-ENOENT);
+
if (!dentry) {
/* We're in RCU-pathwalk. */
cell = rcu_dereference(net->ws_cell);
@@ -325,9 +328,6 @@ static const char *afs_atcell_get_link(struct dentry *dentry, struct inode *inod
return name;
}
- if (!rcu_access_pointer(net->ws_cell))
- return ERR_PTR(-ENOENT);
-
down_read(&net->cells_lock);
cell = rcu_dereference_protected(net->ws_cell, lockdep_is_held(&net->cells_lock));
next prev parent reply other threads:[~2025-03-18 9:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 8:10 syzbot
2025-03-18 9:10 ` [syzbot] " syzbot
2025-03-18 9:17 ` Edward Adam Davis [this message]
2025-03-18 9:51 ` syzbot
2025-03-18 9:26 ` [PATCH] afs: Fix a null-ptr-deref " Edward Adam Davis
[not found] <20250318091024.45600-1-enjuk@amazon.com>
2025-03-18 9:31 ` [syzbot] [afs?] general protection fault " syzbot
2025-03-18 10:23 ` David Howells
2025-03-18 10:43 ` syzbot
2025-03-18 11:17 ` Edward Adam Davis
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_DE79B66C942EF56F989538EA7EEC32CD3C0A@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+76a6f18e3af82e84f264@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®