]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
exfat: Fix bitwise operation having different size
authorPhilipp Hahn <phahn-oss@avm.de>
Tue, 3 Mar 2026 10:59:14 +0000 (11:59 +0100)
committerNamjae Jeon <linkinjeon@kernel.org>
Wed, 4 Mar 2026 10:23:59 +0000 (19:23 +0900)
commit3dce5bb82c97fc2ac28d80d496120a6525ce3fb7
treec5073f693bb09069049566c738cd375e2813125d
parent81440a740d385a992b0652fbd4a5c71edd6f27d2
exfat: Fix bitwise operation having different size

cpos has type loff_t (long long), while s_blocksize has type u32. The
inversion wil happen on u32, the coercion to s64 happens afterwards and
will do 0-left-paddding, resulting in the upper bits getting masked out.

Cast s_blocksize to loff_t before negating it.

Found by static code analysis using Klocwork.

Signed-off-by: Philipp Hahn <phahn-oss@avm.de>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/dir.c