]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async/ProtocolV1: fix locking around authorizer_buf
authorSage Weil <sage@redhat.com>
Wed, 6 Mar 2019 23:40:48 +0000 (17:40 -0600)
committerSage Weil <sage@redhat.com>
Wed, 6 Mar 2019 23:40:54 +0000 (17:40 -0600)
commitf82f8886096b082671b58654c4eb30429785cddc
tree2f412e9c9532b4e567621597abae33b68d4e3b5b
parente030ba465def5b6d3a0d820b0de42e39caa6a983
msg/async/ProtocolV1: fix locking around authorizer_buf

Fix two problems:

- we are accessing authorizer_buf without the connection lock, and
  under the lock we are modifying it (in connect()).
- if we receive two connect_msg's with a different length, we won't
  have a buffer that's large enough.

Fixes: http://tracker.ceph.com/issues/38524
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV1.cc