]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: only copy to userspace on success in listmount()
authorChristian Brauner <brauner@kernel.org>
Thu, 4 Jul 2024 15:00:19 +0000 (17:00 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 4 Jul 2024 15:00:19 +0000 (17:00 +0200)
commit8d42877ad65b02741c9099392a001b7209baa5d4
tree690f0b3cfca477c458e9955bb8ee067c2874d799
parent682d12148c264484562f130f0c8584839ebc36fc
fs: only copy to userspace on success in listmount()

Avoid copying when we failed to, or didn't have any mounts to list.

Fixes: cb54ef4f050e ("fs: don't copy to userspace under namespace semaphore") # mainline only
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/namespace.c