Message ID | 20250111-unsignedcompare1601569-v3-1-c861b4221831@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v3] mm: shmem: Use signed int for version handling in casefold option | expand |
On Sat, 11 Jan 2025 15:31:30 +0000, Karan Sanghavi wrote: > Fixes an issue where the use of an unsigned data type in > `shmem_parse_opt_casefold()` caused incorrect evaluation of > negative conditions. > > Applied to the vfs-6.14.misc branch of the vfs/vfs.git tree. Patches in the vfs-6.14.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs-6.14.misc [1/1] mm: shmem: Use signed int for version handling in casefold option https://git.kernel.org/vfs/vfs/c/5fb18263e9bf
diff --git a/mm/shmem.c b/mm/shmem.c index 7987deb2be9b..17a1d4fa8870 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4367,7 +4367,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;