]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msgr/async: fix unsafe access in unregister_conn() 40912/head
authorSage Weil <sage@newdream.net>
Mon, 19 Apr 2021 14:26:30 +0000 (09:26 -0500)
committerSage Weil <sage@newdream.net>
Mon, 19 Apr 2021 14:26:30 +0000 (09:26 -0500)
commitd51d80b3234e17690061f65dc7e1515f4244a5a3
treed317e973779c0813d6bd14523586e79ee863aa3a
parent4f6adfd148cc792c27e30c9664da5f2a1a3a2d4e
msgr/async: fix unsafe access in unregister_conn()

We were looking at anon_conns and accepting_conns without holding
the lock (deleted_lock is not sufficient).

Drop this test, and move the decrements:

- inc when we add to conns or anon_conns (no changes there)
- dec when we remove from deleted_conns (several different paths!)

Fixes: https://tracker.ceph.com/issues/49237
Signed-off-by: Sage Weil <sage@newdream.net>
src/msg/async/AsyncMessenger.cc
src/msg/async/AsyncMessenger.h