aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
diff options
context:
space:
mode:
authorKuan-Wei Chiu <[email protected]>2024-09-28 11:36:08 +0000
committerPetr Mladek <[email protected]>2024-12-12 09:10:03 +0000
commit3d6f83df8ff2d5de84b50377e4f0d45e25311c7a (patch)
treee64f31472ec3d6346a44e471aa7f2def8c4328e2 /drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
parentMerge tag 'printk-for-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadkernel-3d6f83df8ff2d5de84b50377e4f0d45e25311c7a.tar.gz
kernel-3d6f83df8ff2d5de84b50377e4f0d45e25311c7a.zip
printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX
Shifting 1 << 31 on a 32-bit int causes signed integer overflow, which leads to undefined behavior. To prevent this, cast 1 to u32 before performing the shift, ensuring well-defined behavior. This change explicitly avoids any potential overflow by ensuring that the shift occurs on an unsigned 32-bit integer. Signed-off-by: Kuan-Wei Chiu <[email protected]> Acked-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c')
0 files changed, 0 insertions, 0 deletions