This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13763] New: bindresvport() function is multithread-unsafe


http://sourceware.org/bugzilla/show_bug.cgi?id=13763

             Bug #: 13763
           Summary: bindresvport() function is multithread-unsafe
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: penght@cn.fujitsu.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Created attachment 6250
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6250
The Patch can make bindresvport() function to multithread-safe

bindresvport() uses two static variables port and startport which are not
protected. It is not safe when in multithread circumstance.

bindresvport() select a port number from the range 512 to 1023, when in
multithread circumstance, the port may be 1024. So the static variables will be
protected.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]