Re: [PATCH v2] drm/amdgpu: Fix UBSAN shift-out-of-bounds for gfx v9_0

2022-08-15 Thread Christian König
Am 15.08.22 um 13:08 schrieb Candice Li: Check shift number to avoid doing a shift operation when the number of bits shifted equal to or greater than number of bits in the operand. v2: Only calculate shift number for non-zero data and fix build warning. Well that doesn't sounds like a good ide

[PATCH v2] drm/amdgpu: Fix UBSAN shift-out-of-bounds for gfx v9_0

2022-08-15 Thread Candice Li
Check shift number to avoid doing a shift operation when the number of bits shifted equal to or greater than number of bits in the operand. v2: Only calculate shift number for non-zero data and fix build warning. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++--