<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Concurrent call to glClientWaitSync results in segfault in one of the waiters."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98172#c35">Comment # 35</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Concurrent call to glClientWaitSync results in segfault in one of the waiters."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98172">bug 98172</a>
              from <span class="vcard"><a class="email" href="mailto:maraeo@gmail.com" title="Marek Olšák <maraeo@gmail.com>"> <span class="fn">Marek Olšák</span></a>
</span></b>
        <pre>(In reply to Michel Dänzer from <a href="show_bug.cgi?id=98172#c34">comment #34</a>)
<span class="quote">> (In reply to Suzuki, Shinji from <a href="show_bug.cgi?id=98172#c31">comment #31</a>)
> > Why is this patch rejected?

> Because it'll have to be rebased on top of the updated patch 1.


> > Now I'm revisiting your patch. Do we need to have mutual exclusion on
> >    screen->fence_reference(screen, &fence, so->fence);
> > and
> >       screen->fence_reference(screen, &so->fence, NULL);
> > ?

> I'm not sure r600_fence_reference() is thread safe.</span >

OK, again:

fence_reference is thread-safe with regard to the reference counter and fence
destruction. It doesn't, however, protect the "dst" pointer itself. Therefore:

Not thread safe (race condition on so->fence):
  screen->fence_reference(screen, &so->fence, NULL);

Always thread safe (if fence is a local variable):
  screen->fence_reference(screen, &fence, NULL);</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>