]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/http: skip pause/resume when the request already finished 69774/head
authorMatthew N. Heler <matthew.heler@hotmail.com>
Tue, 23 Jun 2026 15:37:16 +0000 (10:37 -0500)
committerMatthew N. Heler <matthew.heler@hotmail.com>
Fri, 26 Jun 2026 20:05:36 +0000 (15:05 -0500)
req_data->mgr is null once the request finishes. Check it in
_set_write_paused and _set_read_paused before calling set_request_state,
otherwise a late streaming write segfaults.

Signed-off-by: Matthew N. Heler <matthew.heler@hotmail.com>
src/rgw/rgw_http_client.cc

index e415358607bbf8e72795340160cd6ab51ed388fe..5264341780105082def59b4c4c7cd8c1ca1620c0 100644 (file)
@@ -482,6 +482,10 @@ void RGWHTTPClient::_set_write_paused(bool pause)
   ceph_assert(ceph_mutex_is_locked(req_data->lock));
   
   RGWHTTPManager *mgr = req_data->mgr;
+  if (!mgr) {
+    // request already finished; nothing to pause/resume
+    return;
+  }
   if (pause == req_data->write_paused) {
     return;
   }
@@ -497,6 +501,10 @@ void RGWHTTPClient::_set_read_paused(bool pause)
   ceph_assert(ceph_mutex_is_locked(req_data->lock));
   
   RGWHTTPManager *mgr = req_data->mgr;
+  if (!mgr) {
+    // request already finished; nothing to pause/resume
+    return;
+  }
   if (pause == req_data->read_paused) {
     return;
   }