Re: [PATCH] kernfs: Drop kernfs_rwsem while invoking lookup_positive_unlocked().

Al Viro
2025-02-20T20:39:26Z

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().