[Bug 209233] [patch] pthread_suspend_all_np races with check_suspend

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 3 13:14:09 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209233

            Bug ID: 209233
           Summary: [patch] pthread_suspend_all_np races with
                    check_suspend
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: threads
          Assignee: freebsd-threads at FreeBSD.org
          Reporter: le277 at cam.ac.uk
          Keywords: patch

Created attachment 169926
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=169926&action=edit
Patch to fix race

Currently the suspend all implementation in libthr only sets the NEED_SUSPEND
flag if a thread does not have the SUSPENDED flag set. However, that thread may
be in the process of resuming, and so its NEED_SUSPEND flag should always be
set if we wish a thread to stay suspended, even if already has the SUSPENDED
flag set.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-threads mailing list