diff options
author | Karan Sanghavi <karansanghvi98@gmail.com> | 2025-01-11 16:31:30 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-16 06:15:43 +0100 |
commit | b071cc35469ea44392222fe8de69b431a0778a5f (patch) | |
tree | 50258f5394d7df630c6ef1d21fe512ef015383e7 /mm/shmem.c | |
parent | alloc_tag: skip pgalloc_tag_swap if profiling is disabled (diff) | |
download | linux-b071cc35469ea44392222fe8de69b431a0778a5f.tar.xz linux-b071cc35469ea44392222fe8de69b431a0778a5f.zip |
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: 58e55efd6c72 ("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>
Diffstat (limited to '')
-rw-r--r-- | mm/shmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index ac58d4fb2e6f..fdb5afa1cfe9 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4368,7 +4368,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter * bool latest_version) { struct shmem_options *ctx = fc->fs_private; - unsigned int version = UTF8_LATEST; + int version = UTF8_LATEST; struct unicode_map *encoding; char *version_str = param->string + 5; |