]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: user correct tags for coverity annotations and add the SUPPRESS 52044/head
authorVedansh Bhartia <vedanshbhartia@gmail.com>
Tue, 13 Jun 2023 18:17:48 +0000 (23:47 +0530)
committerVedansh Bhartia <vedanshbhartia@gmail.com>
Wed, 14 Jun 2023 03:41:00 +0000 (09:11 +0530)
keyword

Signed-off-by: Vedansh Bhartia <vedanshbhartia@gmail.com>
12 files changed:
src/rgw/driver/rados/cls_fifo_legacy.h
src/rgw/driver/rados/rgw_gc.cc
src/rgw/driver/rados/rgw_trim_datalog.cc
src/rgw/driver/rados/rgw_trim_mdlog.cc
src/rgw/rgw_admin.cc
src/rgw/rgw_aio_throttle.cc
src/rgw/rgw_common.h
src/rgw/rgw_d3n_cacherequest.h
src/rgw/rgw_kafka.cc
src/rgw/rgw_kmip_client_impl.cc
src/rgw/rgw_period_history.cc
src/rgw/rgw_torrent.cc

index d0efe20a071816590136202c1670894403210ddb..c345c728512aaf9282853350ae39c352ba0c1fec 100644 (file)
@@ -314,7 +314,7 @@ public:
                                               &cb);
     auto c = p->_cur;
     p.release();
-    // coverity[RESOURCE_LEAK:FALSE]
+    // coverity[leaked_storage:SUPPRESS]
     return c;
   }
   static void complete(Ptr&& p, int r) {
index 231d8031146319d0745ab41ac0ec23af8981ebab..1e2ac7b270b4377ee89796682ce3ac2d2178c3c7 100644 (file)
@@ -214,7 +214,7 @@ int RGWGC::async_defer_chain(const string& tag, const cls_rgw_obj_chain& chain)
 
   int ret = store->gc_aio_operate(obj_names[i], state->completion, &op);
   if (ret == 0) {
-    // coverity[RESOURCE_LEAK:FALSE]
+    // coverity[leaked_storage:SUPPRESS]
     state.release(); // release ownership until async_defer_callback()
   }
   return ret;
index 88f840818b293568b50c4817a9ab78113109f8ef..12adc6fbaa5425755bb4ac137873e3f96ef189ec 100644 (file)
@@ -225,7 +225,7 @@ int DataLogTrimPollCR::operate(const DoutPrefixProvider *dpp)
       set_status("acquiring trim lock");
 
       // interval is a small number and unlikely to overflow
-      // coverity[Y2K38_SAFETY:FALSE]
+      // coverity[store_truncates_time_t:SUPPRESS]
       yield call(new RGWSimpleRadosLockCR(store->svc()->rados->get_async_processor(), store,
                                           rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, lock_oid),
                                           "data_trim", lock_cookie,
index 4f813582032aaea3607ac0355896a9ddbb2bfefc..d97538f983214f11db3edfa1e12cb4fe2abfd5a2 100644 (file)
@@ -670,7 +670,7 @@ int MetaTrimPollCR::operate(const DoutPrefixProvider *dpp)
       set_status("acquiring trim lock");
 
       // interval is a small number and unlikely to overflow
-      // coverity[Y2K38_SAFETY:FALSE]
+      // coverity[store_truncates_time_t:SUPPRESS]
       yield call(new RGWSimpleRadosLockCR(store->svc()->rados->get_async_processor(), store,
                                           obj, name, cookie, interval.sec()));
       if (retcode < 0) {
index eddb2e791d780b53dba89336703a0883dbcd3b98..80154805fd333cc579c3266f82e961309b000c1a 100644 (file)
@@ -3023,7 +3023,7 @@ static int scan_totp(CephContext *cct, ceph::real_time& now, rados::cls::otp::ot
     if (rc != OATH_INVALID_OTP) {
       // oath_totp_validate2 is an external library function, cannot fix internally
       // Further, step_size is a small number and unlikely to overflow
-      // coverity[Y2K38_SAFETY:FALSE]
+      // coverity[store_truncates_time_t:SUPPRESS]
       rc = oath_totp_validate2(totp.seed_bin.c_str(), totp.seed_bin.length(),
                                start_time, 
                                step_size,
@@ -10368,7 +10368,7 @@ next:
     }
 
     // time offset is a small number and unlikely to overflow
-    // coverity[Y2K38_SAFETY:FALSE]
+    // coverity[store_truncates_time_t:SUPPRESS]
     config.time_ofs = time_ofs;
 
     /* now update the backend */
index 59f006c07e65c7e0ae242fa119e44619f06135c2..d5574ddc4c2c5a319533ff09db44b7746013bced 100644 (file)
@@ -57,7 +57,7 @@ AioResultList BlockingAioThrottle::get(rgw_raw_obj obj,
     std::move(f)(this, *static_cast<AioResult*>(p.get()));
     lock.lock();
   }
-  // coverity[RESOURCE_LEAK:FALSE]
+  // coverity[leaked_storage:SUPPRESS]
   p.release();
   return std::move(completed);
 }
@@ -147,7 +147,7 @@ AioResultList YieldingAioThrottle::get(rgw_raw_obj obj,
     pending.push_back(*p);
     std::move(f)(this, *static_cast<AioResult*>(p.get()));
   }
-  // coverity[RESOURCE_LEAK:FALSE]
+  // coverity[leaked_storage:SUPPRESS]
   p.release();
   return std::move(completed);
 }
index 8687afc3b244631929032d8781cef848231e7bf3..ad53562a598d072554d39c52881de3f688dead6f 100644 (file)
@@ -1294,7 +1294,7 @@ struct RGWBucketEnt {
     ENCODE_START(7, 5, bl);
     uint64_t s = size;
     // issue tracked here: https://tracker.ceph.com/issues/61160
-    // coverity[Y2K38_SAFETY]
+    // coverity[store_truncates_time_t:SUPPRESS]
     __u32 mt = ceph::real_clock::to_time_t(creation_time);
     std::string empty_str;  // originally had the bucket name here, but we encode bucket later
     encode(empty_str, bl);
index 48fdbe168bb0af872b99e316dce62937b8b6c424..9a5d2df3aacf46553fad6ed0aca4c8750746476c 100644 (file)
@@ -114,7 +114,7 @@ struct D3nL1CacheRequest {
       auto ec = boost::system::error_code{-ret, boost::system::system_category()};
       ceph::async::post(std::move(p), ec, bufferlist{});
     } else {
-      // coverity[RESOURCE_LEAK:FALSE]
+      // coverity[leaked_storage:SUPPRESS]
       (void)p.release();
     }
     return init.result.get();
index afc19764a75711cd0a8d1338e564bf5e1607c207..678e6d62bfe9ffcf0b56ffe2b77ba2d74dccbe7a 100644 (file)
@@ -429,7 +429,7 @@ private:
     } else {
         ldout(conn->cct, 20) << "Kafka publish (no callback): OK" << dendl;
     }
-    // coverity[RESOURCE_LEAK:FALSE]
+    // coverity[leaked_storage:SUPPRESS]
   }
 
   // the managers thread:
index a8f9dbac0554874a3ee8e4230cf507fc6e3bb022..b7f4f38e620d9d600a65b26fec8d714982ee71b0 100644 (file)
@@ -419,7 +419,7 @@ RGWKMIPManagerImpl::add_request(RGWKMIPTransceiver *req)
   if (going_down)
     return -ECANCELED;
   // requests is a boost::intrusive::list, which manages pointers and does not copy the instance
-  // coverity[RESOURCE_LEAK:FALSE]
+  // coverity[leaked_storage:SUPPRESS]
   requests.push_back(*new Request{*req});
   l.unlock();
   if (worker)
index 70750368f375e12f597b28850b519f4b9c59f8f2..40a0daf3b44656ebae3c313cb5a11c05cd94931b 100644 (file)
@@ -133,7 +133,7 @@ RGWPeriodHistory::Impl::Impl(CephContext* cct, Puller* puller,
     history->periods.push_back(current_period);
 
     // insert as our current history
-    // coverity[RESOURCE_LEAK:FALSE]
+    // coverity[leaked_storage:SUPPRESS]
     current_history = histories.insert(*history).first;
 
     // get a cursor to the current period
@@ -246,7 +246,7 @@ Cursor RGWPeriodHistory::Impl::insert_locked(RGWPeriod&& period)
     // create a new history for this period
     auto history = new History;
     history->periods.emplace_back(std::move(period));
-    // coverity[RESOURCE_LEAK:FALSE]
+    // coverity[leaked_storage:SUPPRESS]
     histories.insert(last, *history);
 
     i = Set::s_iterator_to(*history);
@@ -296,7 +296,7 @@ Cursor RGWPeriodHistory::Impl::insert_locked(RGWPeriod&& period)
   // create a new history for this period
   auto history = new History;
   history->periods.emplace_back(std::move(period));
-  // coverity[RESOURCE_LEAK:FALSE]
+  // coverity[leaked_storage:SUPPRESS]
   histories.insert(i, *history);
 
   i = Set::s_iterator_to(*history);
index af9c4a632dc984df0e7f5bdabcf03989ef68569c..69900163f1373faf05557f9111fbd27e7bc08f2c 100644 (file)
@@ -170,7 +170,7 @@ bufferlist RGWPutObj_Torrent::bencode_torrent(std::string_view filename) const
   // Only encode create_date and sha1 info. Other fields will be added during
   // GetObjectTorrent by rgw_read_torrent_file()
   // issue tracked here: https://tracker.ceph.com/issues/61160
-  // coverity[Y2K38_SAFETY]
+  // coverity[store_truncates_time_t:SUPPRESS]
   bencode(CREATION_DATE, std::time(nullptr), bl);
 
   bencode_key(INFO_PIECES, bl);