kernel_samsung_a53x/net/9p
Linus Torvalds 6767157e30 9p: fix slab cache name creation for real
commit a360f311f57a36e96d88fa8086b749159714dcd2 upstream.

This was attempted by using the dev_name in the slab cache name, but as
Omar Sandoval pointed out, that can be an arbitrary string, eg something
like "/dev/root".  Which in turn trips verify_dirent_name(), which fails
if a filename contains a slash.

So just make it use a sequence counter, and make it an atomic_t to avoid
any possible races or locking issues.

Reported-and-tested-by: Omar Sandoval <osandov@fb.com>
Link: https://lore.kernel.org/all/ZxafcO8KWMlXaeWE@telecaster.dhcp.thefacebook.com/
Fixes: 79efebae4afc ("9p: Avoid creating multiple slab caches with the same name")
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Dominique Martinet <asmadeus@codewreck.org>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:28 +01:00
..
client.c 9p: fix slab cache name creation for real 2024-11-30 02:33:28 +01:00
error.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mod.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protocol.c net: 9p: avoid freeing uninit memory in p9pdu_vreadf 2024-11-18 12:12:01 +01:00
protocol.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trans_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trans_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trans_fd.c 9p/trans_fd: Annotate data-racy writes to file::f_flags 2024-11-18 11:43:14 +01:00
trans_rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trans_virtio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trans_xen.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00