Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2557

in mmap_posix, failed map() followed by close() may result in attempt to close an invalid handle

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.9.0
    • Affects Version/s: None
    • Component/s: None
    • None

      In MemoryMappedFile::map(), fd is assigned to ::open() but is not reset to zero if ::open() fails. This can result in an attempt to close an invalid file handle in MemoryMappedFile::close(). Not necessarily a problem, but if we are doing any syscall auditing or if we check the return value of ::close at some point (which wouldn't be a bad idea) we will notice failures.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: