[OpenSIPS/opensips] a4880e: dialog: Fix some locking corner-cases

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[OpenSIPS/opensips] a4880e: dialog: Fix some locking corner-cases

Vlad Pătrașcu
  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: a4880e89fbec71e1975955167427b2ce5f1d642e
  Author: Liviu Chircu <[hidden email]>
  Date:   2020-02-26 (Wed, 26 Feb 2020)

  Changed paths:
    M modules/dialog/dlg_db_handler.c
    M modules/dialog/dlg_handlers.c
    M modules/dialog/dlg_replication.c

  Log Message:
  dialog: Fix some locking corner-cases

    * in parallel forking:
        [READER] dlg_onreq_out() (read dlg->legs) vs.
        [WRITER] push_reply_in_dialog() (write dlg->legs)
           (may happen if concurrently processing 200 OK from branch X)

    * DB load: to be 100% accurate, do not use ref_unsafe(), as we
       don't hold the lock -- use the safe version instead!

(cherry picked from commit b9511b91f1aea8b9f83da41cd18fd43ce6bc3092)

Devel mailing list
[hidden email]