Re: [PATCH] kernfs: Drop kernfs_rwsem while invoking lookup_positive_unlocked().
From: Al Viro
Date: Thu Feb 20 2025 - 15:39:35 EST
On Tue, Feb 18, 2025 at 05:39:38PM +0100, Sebastian Andrzej Siewior wrote:
> + scoped_guard(rcu) {
> + knparent = find_next_ancestor(kn, NULL);
> + if (WARN_ON(!knparent)) {
> + dput(dentry);
> + return ERR_PTR(-EINVAL);
> + }
NAK. dput() is blocking; you *can't* do that under rcu_read_lock().