]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/AsyncMessenger: clear need_addr *after* we set our new addr
authorSage Weil <sage@redhat.com>
Sat, 26 Jan 2019 23:01:14 +0000 (17:01 -0600)
committerSage Weil <sage@redhat.com>
Sat, 26 Jan 2019 23:01:14 +0000 (17:01 -0600)
commit6e933fe1b8f2863deb76a7e0accd9f315d1cb6f0
treee0a95e4f31376786e6bede41d987cff668eae1c3
parentd9f3022a513a212e9bb4d55902280f74f2804baf
msg/async/AsyncMessenger: clear need_addr *after* we set our new addr

We check need_addr at the top without a lock held, so we need to be sure
we finished our work before we clear it, or else when there are two racing
threads the first will get the clock and clear the value and the second
will do nothing and see the unlearned value before the first finishes.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/AsyncMessenger.cc