[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/19] util/async: Fixed tsan warnings
From: |
Robert Foley |
Subject: |
Re: [PATCH 14/19] util/async: Fixed tsan warnings |
Date: |
Tue, 26 May 2020 11:19:35 -0400 |
On Sat, 23 May 2020 at 16:12, Emilio G. Cota <address@hidden> wrote:
>
> On Fri, May 22, 2020 at 12:07:50 -0400, Robert Foley wrote:
<snip>
>
> > QSIMPLEQ_INSERT_TAIL(&ctx->bh_slice_list, &slice, next);
> >
> > while ((s = QSIMPLEQ_FIRST(&ctx->bh_slice_list))) {
> > @@ -280,14 +285,16 @@ aio_ctx_check(GSource *source)
> > aio_notify_accept(ctx);
> >
> > QSLIST_FOREACH_RCU(bh, &ctx->bh_list, next) {
> > - if ((bh->flags & (BH_SCHEDULED | BH_DELETED)) == BH_SCHEDULED) {
> > + if ((atomic_read(&bh->flags) & (BH_SCHEDULED | BH_DELETED))
> > + == BH_SCHEDULED) {
> > return true;
> > }
> > }
> >
> > QSIMPLEQ_FOREACH(s, &ctx->bh_slice_list, next) {
> > QSLIST_FOREACH_RCU(bh, &s->bh_list, next) {
> > - if ((bh->flags & (BH_SCHEDULED | BH_DELETED)) == BH_SCHEDULED)
> > {
> > + if ((atomic_read(&bh->flags) & (BH_SCHEDULED | BH_DELETED))
> > + == BH_SCHEDULED) {
>
> This hunk like the real fix. Also, I'd put "fix race" in the commit
> title as opposed to "fix warning" since fixing races is the goal, not
> fixing warnings.
Good point, will update the commit.
Thanks & Regards,
-Rob
>
> Thanks,
>
> Emilio
- [PATCH 12/19] configure: added tsan support for blacklist., (continued)
- [PATCH 12/19] configure: added tsan support for blacklist., Robert Foley, 2020/05/22
- [PATCH 13/19] accel/tcg: Fixed tsan warnings., Robert Foley, 2020/05/22
- [PATCH 05/19] qht: call qemu_spin_destroy for head buckets, Robert Foley, 2020/05/22
- [PATCH 14/19] util/async: Fixed tsan warnings, Robert Foley, 2020/05/22
- [PATCH 15/19] qht: Fix tsan warnings., Robert Foley, 2020/05/22
- [PATCH 16/19] util: fixed tsan warnings in thread_pool.c, Robert Foley, 2020/05/22
- [PATCH 17/19] util: Added tsan annotate for thread name., Robert Foley, 2020/05/22
- [PATCH 18/19] target/arm: Fix tsan warning in cpu.c, Robert Foley, 2020/05/22