[OpenSIPS-Devel] [OpenSIPS/opensips] ce3c4c: HP_MALLOC: Fix a shm_realloc() concurrency issue

Liviu Chircu noreply at github.com
Tue Feb 4 11:20:59 EST 2020


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ce3c4c553d28fd92709d9a051a1781d3b58b444a
      https://github.com/OpenSIPS/opensips/commit/ce3c4c553d28fd92709d9a051a1781d3b58b444a
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-02-04 (Tue, 04 Feb 2020)

  Changed paths:
    M mem/hp_malloc.c

  Log Message:
  -----------
  HP_MALLOC:  Fix a shm_realloc() concurrency issue

On a fragment shrink operation, we must also grab the lock on the
resulting fragment before inserting it (this cannot be an _unsafe
operation!)

Many thanks to 46Labs and Răzvan Crainea for helping troubleshoot this

(cherry picked from commit ff7ba6e2dd05fbc4989561d7a4582cb11cbb01ba)





More information about the Devel mailing list