Files
linux-stable-mirror/drivers
Denis SergeevandGreg Kroah-Hartman 604f777080 gpiolib: acpi: use BIT_ULL() for u64 mask in address space handler
[ Upstream commit c0ae43d303 ]

The BIT() macro uses unsigned long, which is 32 bits on 32-bit
architectures. When iterating over GPIO pins with index >= 32,
the expression (*value & BIT(i)) causes undefined behavior due
to shifting by a value >= type width.

Since 'value' is a pointer to u64, use BIT_ULL() to ensure correct
64-bit mask on all architectures.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes: 2c4d00cb8f ("gpiolib: acpi: Use BIT() macro to increase readability")
Signed-off-by: Denis Sergeev <denserg.edu@gmail.com>
Reviewed-by: Mika Westerberg <westeri@kernel.org>
Link: https://lore.kernel.org/r/20260126035914.16586-1-denserg.edu@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-02-06 16:44:16 +01:00
..
2026-01-17 16:39:26 +01:00
2026-01-11 15:18:50 +01:00
2025-12-07 06:12:28 +09:00
2026-01-11 15:19:26 +01:00
2026-01-11 15:18:57 +01:00