OpenCloudOS-Kernel/fs/cachefiles
David Howells 81b048b948 cachefiles: Fix non-taking of sb_writers around set/removexattr
[ Upstream commit 80887f31672970abae3aaa9cf62ac72a124e7c89 ]

Unlike other vfs_xxxx() calls, vfs_setxattr() and vfs_removexattr() don't
take the sb_writers lock, so the caller should do it for them.

Fix cachefiles to do this.

Fixes: 9ae326a690 ("CacheFiles: A cache that backs onto a mounted filesystem")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Christian Brauner <brauner@kernel.org>
cc: Gao Xiang <xiang@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-erofs@lists.ozlabs.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20240814203850.2240469-3-dhowells@redhat.com/ # v2
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-04 16:29:00 +02:00
..
Kconfig cachefiles: notify the user daemon when looking up cookie 2022-05-18 00:11:17 +08:00
Makefile cachefiles: notify the user daemon when looking up cookie 2022-05-18 00:11:17 +08:00
cache.c cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie() 2024-07-25 09:50:58 +02:00
daemon.c cachefiles: add missing lock protection when polling 2024-07-18 13:21:11 +02:00
error_inject.c fs/cachefiles: simplify one-level sysctl registration for cachefiles_sysctls 2023-04-13 11:49:35 -07:00
interface.c cachefiles: extract ondemand info field from cachefiles_object 2024-06-21 14:38:27 +02:00
internal.h cachefiles: cyclic allocation of msg_id to avoid reuse 2024-07-18 13:21:11 +02:00
io.c cachefiles: use kiocb_{start,end}_write() helpers 2023-08-21 17:27:27 +02:00
key.c cachefiles: Implement key to filename encoding 2022-01-07 13:42:16 +00:00
main.c cachefiles: Implement object lifecycle funcs 2022-01-07 13:42:08 +00:00
namei.c mm, netfs, fscache: stop read optimisation when folio removed from pagecache 2023-08-18 10:12:13 -07:00
ondemand.c cachefiles: make on-demand read killable 2024-07-25 09:50:45 +02:00
security.c cachefiles: Add security derivation 2022-01-07 13:41:14 +00:00
volume.c cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie() 2024-07-25 09:50:58 +02:00
xattr.c cachefiles: Fix non-taking of sb_writers around set/removexattr 2024-10-04 16:29:00 +02:00