Re: [PATCH v2] KVM: s390: selftest: memop: Fix undefined behavior

From: Janosch Frank
Date: Thu Feb 22 2024 - 06:30:47 EST


On 1/11/24 10:48, Nina Schoetterl-Glausch wrote:
If an integer's type has x bits, shifting the integer left by x or more
is undefined behavior.
This can happen in the rotate function when attempting to do a rotation
of the whole value by 0.

Fixes: 0dd714bfd200 ("KVM: s390: selftest: memop: Add cmpxchg tests")
Signed-off-by: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>


Acked-by: Janosch Frank <frankja@xxxxxxxxxxxxx>