]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: get ref to message for lambda 26661/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 26 Feb 2019 20:27:40 +0000 (12:27 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 4 Mar 2019 17:12:04 +0000 (09:12 -0800)
Otherwise we have invalid reads. Caught by valgrind.

This cannot be cherry-picked as it was a bug introduced by a backport.

Introduced-by: 2f6289ff7f7385e462d59e096634a1dee0b60837
Fixes: http://tracker.ceph.com/issues/38488
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Server.cc

index 7d7e818a550d6ca7b9b19ef883c6d1aa255fd38e..6a3edc99bbae7331bab4e477d72430cbd0123693 100644 (file)
@@ -372,7 +372,7 @@ void Server::handle_client_session(MClientSession *m)
       session->set_client_metadata(m->client_meta);
       auto& client_metadata = session->info.client_metadata;
 
-      auto log_session_status = [this, m, session](boost::string_view status, boost::string_view err) {
+      auto log_session_status = [this, m = m->get(), session](boost::string_view status, boost::string_view err) {
         auto now = ceph_clock_now();
         auto throttle_elapsed = m->get_recv_complete_stamp() - m->get_throttle_stamp();
         auto elapsed = now - m->get_recv_stamp();
@@ -391,6 +391,7 @@ void Server::handle_client_session(MClientSession *m)
           ss << ",root=\"" << it->second << "\"";
         }
         dout(2) << ss.str() << dendl;
+        m->put();
       };
 
       if (blacklisted) {