Re: [PATCH] xfs_db: bit fuzzing should read the right bit when flipping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/19/17 10:32 AM, Darrick J. Wong wrote:
> The middle and last bit flip fuzz verbs need to read the same bit that
> they're trying to set.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  db/fuzz.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/db/fuzz.c b/db/fuzz.c
> index 53cedbc..d0d78a9 100644
> --- a/db/fuzz.c
> +++ b/db/fuzz.c
> @@ -226,7 +226,7 @@ fuzz_lastbit(
>  	int		nbits)
>  {
>  	setbit_l((char *)buf, bitoff + nbits - 1,
> -			!getbit_l((char *)buf, bitoff));
> +			!getbit_l((char *)buf, bitoff + nbits - 1));
>  	return true;
>  }
>  
> @@ -238,7 +238,7 @@ fuzz_middlebit(
>  	int		nbits)
>  {
>  	setbit_l((char *)buf, bitoff + nbits / 2,
> -			!getbit_l((char *)buf, bitoff));
> +			!getbit_l((char *)buf, bitoff + nbits / 2));
>  	return true;
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux