* [PATCH] xfs_db: bit fuzzing should read the right bit when flipping
@ 2017-08-19 15:32 Darrick J. Wong
2017-08-21 18:44 ` Eric Sandeen
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2017-08-19 15:32 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
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@oracle.com>
---
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] xfs_db: bit fuzzing should read the right bit when flipping
2017-08-19 15:32 [PATCH] xfs_db: bit fuzzing should read the right bit when flipping Darrick J. Wong
@ 2017-08-21 18:44 ` Eric Sandeen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2017-08-21 18:44 UTC (permalink / raw)
To: Darrick J. Wong, Eric Sandeen; +Cc: xfs
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@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-21 18:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 15:32 [PATCH] xfs_db: bit fuzzing should read the right bit when flipping Darrick J. Wong
2017-08-21 18:44 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox