Skip to content

Commit b071cc3

Browse files
NaRaK-AK47akpm00
authored andcommitted
mm: shmem: use signed int for version handling in casefold option
Fixes an issue where the use of an unsigned data type in `shmem_parse_opt_casefold()` caused incorrect evaluation of negative conditions. Link: https://lkml.kernel.org/r/20250111-unsignedcompare1601569-v3-1-c861b4221831@gmail.com Fixes: 58e55ef ("tmpfs: Add casefold lookup support") Reviewed-by: André Almeida <andrealmeid@igalia.com> Reviewed-by: Gabriel Krisman Bertazi <gabriel@krisman.be> Signed-off-by: Karan Sanghavi <karansanghvi98@gmail.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Hugh Dickens <hughd@google.com> Cc: Shuah khan <skhan@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 05c82ee commit b071cc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/shmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4368,7 +4368,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter *
43684368
bool latest_version)
43694369
{
43704370
struct shmem_options *ctx = fc->fs_private;
4371-
unsigned int version = UTF8_LATEST;
4371+
int version = UTF8_LATEST;
43724372
struct unicode_map *encoding;
43734373
char *version_str = param->string + 5;
43744374

0 commit comments

Comments
 (0)