statmount: don't call path_put() under namespace semaphore
authorChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 15:03:51 +0000 (17:03 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 26 Sep 2025 08:16:06 +0000 (10:16 +0200)
commite8c84e2082e69335f66c8ade4895e80ec270d7c4
treede460b29735e56d560aec9e8c145f84a498d7d97
parentb9cb7e59ac4ae68940347ebfc41e0436d32d3c6e
statmount: don't call path_put() under namespace semaphore

Massage statmount() and make sure we don't call path_put() under the
namespace semaphore. If we put the last reference we're fscked.

Fixes: 46eae99ef733 ("add statmount(2) syscall")
Cc: stable@vger.kernel.org # v6.8+
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/namespace.c