Commit a360f31
committed
9p: fix slab cache name creation for real
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 <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/
Fixes: 79efeba ("9p: Avoid creating multiple slab caches with the same name")
Acked-by: Vlastimil Babka <[email protected]>
Cc: Dominique Martinet <[email protected]>
Cc: Thorsten Leemhuis <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>1 parent d129377 commit a360f31
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
| 980 | + | |
980 | 981 | | |
981 | 982 | | |
982 | 983 | | |
| |||
1036 | 1037 | | |
1037 | 1038 | | |
1038 | 1039 | | |
1039 | | - | |
| 1040 | + | |
| 1041 | + | |
1040 | 1042 | | |
1041 | 1043 | | |
1042 | 1044 | | |
| |||
0 commit comments