Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 05:35:16PM +, Andrew Cooper wrote: > On 21/11/2024 4:32 pm, Roger Pau Monné wrote: > > On Thu, Nov 21, 2024 at 02:50:00PM +, Andrew Cooper wrote: > >> diff --git a/xen/common/bitops.c b/xen/common/bitops.c > >> index 91ae961440af..0edd62d25c28 100644 > >> --- a/xen/c

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
On 21/11/2024 4:07 pm, Jan Beulich wrote: > On 21.11.2024 15:50, Andrew Cooper wrote: >> for_each_set_bit()'s use of a double for loop had an accidental bug with a >> break in the inner loop leading to an infinite outer loop. >> >> Adjust for_each_set_bit() to avoid this behaviour, and add extend >

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
On 21/11/2024 4:32 pm, Roger Pau Monné wrote: > On Thu, Nov 21, 2024 at 02:50:00PM +, Andrew Cooper wrote: >> for_each_set_bit()'s use of a double for loop had an accidental bug with a >> break in the inner loop leading to an infinite outer loop. >> >> Adjust for_each_set_bit() to avoid this be

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Roger Pau Monné
On Thu, Nov 21, 2024 at 02:50:00PM +, Andrew Cooper wrote: > for_each_set_bit()'s use of a double for loop had an accidental bug with a > break in the inner loop leading to an infinite outer loop. > > Adjust for_each_set_bit() to avoid this behaviour, and add extend > test_for_each_set_bit() w

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Jan Beulich
On 21.11.2024 15:50, Andrew Cooper wrote: > for_each_set_bit()'s use of a double for loop had an accidental bug with a > break in the inner loop leading to an infinite outer loop. > > Adjust for_each_set_bit() to avoid this behaviour, and add extend > test_for_each_set_bit() with a test case for t

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
On 21/11/2024 3:19 pm, Frediano Ziglio wrote: > On Thu, Nov 21, 2024 at 2:50 PM Andrew Cooper > wrote: >> for_each_set_bit()'s use of a double for loop had an accidental bug with a >> break in the inner loop leading to an infinite outer loop. >> >> Adjust for_each_set_bit() to avoid this behaviou

Re: [PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Frediano Ziglio
On Thu, Nov 21, 2024 at 2:50 PM Andrew Cooper wrote: > > for_each_set_bit()'s use of a double for loop had an accidental bug with a > break in the inner loop leading to an infinite outer loop. > > Adjust for_each_set_bit() to avoid this behaviour, and add extend > test_for_each_set_bit() with a te

[PATCH] xen/bitops: Fix break with in a for_each_set_bit() loop

2024-11-21 Thread Andrew Cooper
for_each_set_bit()'s use of a double for loop had an accidental bug with a break in the inner loop leading to an infinite outer loop. Adjust for_each_set_bit() to avoid this behaviour, and add extend test_for_each_set_bit() with a test case for this. Fixes: ed26376f20bf ("xen/bitops: Introduce fo