]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kernfs: Move dput() outside of the RCU section.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 21 Feb 2025 08:42:32 +0000 (09:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 10:55:15 +0000 (11:55 +0100)
commitc5020c5be9d266f66fa5ba3286f0e8d2d2265970
treef525fd4edc1c2cc8c8c01707df7552c0b72a3d03
parente965efc4aa14d9195d26a956a6bff5041110a155
kernfs: Move dput() outside of the RCU section.

Al Viro pointed out that dput() might sleep and must not be invoked
within an RCU section.

Keep only find_next_ancestor() winthin the RCU section.
Correct the wording in the comment.

Fixes: 6ef5b6fae3040 ("kernfs: Drop kernfs_rwsem while invoking lookup_positive_unlocked().")
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20250221084232.xksA_IQ4@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/mount.c