From: scan-admin@coverity.com
To: ceph-devel@vger.kernel.org
Subject: New Defects reported by Coverity Scan for ceph
Date: Wed, 01 Mar 2017 23:44:34 -0800 [thread overview]
Message-ID: <58b7cd62dde19_5e3a12f732070268@ss1435.mail> (raw)
Hi,
Please find the latest report on new defect(s) introduced to ceph found with Coverity Scan.
23 new defect(s) introduced to ceph found with Coverity Scan.
3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 20 of 23 defect(s)
** CID 717332: Uninitialized members (UNINIT_CTOR)
/home/brad/working/src/ceph/src/os/filestore/FileJournal.h: 260 in FileJournal::aio_info::aio_info(ceph::buffer::list &, unsigned long, unsigned long)()
________________________________________________________________________________________________________
*** CID 717332: Uninitialized members (UNINIT_CTOR)
/home/brad/working/src/ceph/src/os/filestore/FileJournal.h: 260 in FileJournal::aio_info::aio_info(ceph::buffer::list &, unsigned long, unsigned long)()
254 uint64_t off, len; ///< these are for debug only
255 uint64_t seq; ///< seq number to complete on aio completion, if non-zero
256
257 aio_info(bufferlist& b, uint64_t o, uint64_t s)
258 : iov(NULL), done(false), off(o), len(b.length()), seq(s) {
259 bl.claim(b);
>>> CID 717332: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member field "iocb.aio_fildes" is not initialized in this constructor nor in any functions that it calls.
260 }
261 ~aio_info() {
262 delete[] iov;
263 }
264 };
265 Mutex aio_lock;
** CID 1251086: Uninitialized members (UNINIT_CTOR)
/usr/include/c++/6.2.1/functional: 2111 in std::function<void (boost::scoped_ptr<ObjectStore> &, unsigned long, unsigned long, unsigned long, unsigned long)>::function(const std::function<void (boost::scoped_ptr<ObjectStore> &, unsigned long, unsigned long, unsigned long, unsigned long)>&)()
________________________________________________________________________________________________________
*** CID 1251086: Uninitialized members (UNINIT_CTOR)
/usr/include/c++/6.2.1/functional: 2111 in std::function<void (boost::scoped_ptr<ObjectStore> &, unsigned long, unsigned long, unsigned long, unsigned long)>::function(const std::function<void (boost::scoped_ptr<ObjectStore> &, unsigned long, unsigned long, unsigned long, unsigned long)>&)()
2105 if (static_cast<bool>(__x))
2106 {
2107 __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
2108 _M_invoker = __x._M_invoker;
2109 _M_manager = __x._M_manager;
2110 }
>>> CID 1251086: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "_M_invoker" is not initialized in this constructor nor in any functions that it calls.
2111 }
2112
2113 template<typename _Res, typename... _ArgTypes>
2114 template<typename _Functor, typename, typename>
2115 function<_Res(_ArgTypes...)>::
2116 function(_Functor __f)
** CID 1369577: Uninitialized members (UNINIT_CTOR)
/usr/include/c++/6.2.1/functional: 2127 in std::function<void (boost::scoped_ptr<ObjectStore> &, unsigned long, unsigned long, unsigned long, unsigned long)>::function<void (*)(boost::scoped_ptr<ObjectStore> &, int, unsigned long, unsigned long, unsigned long), void, void>(T1)()
________________________________________________________________________________________________________
*** CID 1369577: Uninitialized members (UNINIT_CTOR)
/usr/include/c++/6.2.1/functional: 2127 in std::function<void (boost::scoped_ptr<ObjectStore> &, unsigned long, unsigned long, unsigned long, unsigned long)>::function<void (*)(boost::scoped_ptr<ObjectStore> &, int, unsigned long, unsigned long, unsigned long), void, void>(T1)()
2121 if (_My_handler::_M_not_empty_function(__f))
2122 {
2123 _My_handler::_M_init_functor(_M_functor, std::move(__f));
2124 _M_invoker = &_My_handler::_M_invoke;
2125 _M_manager = &_My_handler::_M_manager;
2126 }
>>> CID 1369577: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "_M_invoker" is not initialized in this constructor nor in any functions that it calls.
2127 }
2128
2129 template<typename _Res, typename... _ArgTypes>
2130 _Res
2131 function<_Res(_ArgTypes...)>::
2132 operator()(_ArgTypes... __args) const
** CID 1401633: Concurrent data access violations (ATOMICITY)
/home/brad/working/src/ceph/src/osd/OSD.cc: 9237 in OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d *)()
________________________________________________________________________________________________________
*** CID 1401633: Concurrent data access violations (ATOMICITY)
/home/brad/working/src/ceph/src/osd/OSD.cc: 9237 in OSD::ShardedOpWQ::_process(unsigned int, ceph::heartbeat_handle_d *)()
9231 pg->unlock();
9232 }
9233 sdata->sdata_op_ordering_lock.Unlock();
9234 return;
9235 }
9236 if (requeue_seq != slot.requeue_seq) {
>>> CID 1401633: Concurrent data access violations (ATOMICITY)
>>> Using an unreliable value of "requeue_seq" inside the second locked section. If the data that "requeue_seq" depends on was changed by another thread, this use might be incorrect.
9237 dout(20) << __func__ << " " << item.first
9238 << " requeue_seq " << slot.requeue_seq << " > our "
9239 << requeue_seq << ", we raced with wake_pg_waiters"
9240 << dendl;
9241 if (pg) {
9242 pg->unlock();
** CID 1401634: Security best practices violations (DC.WEAK_CRYPTO)
/home/brad/working/src/ceph/src/osd/OSD.h: 481 in OSDService::maybe_inject_dispatch_delay()()
________________________________________________________________________________________________________
*** CID 1401634: Security best practices violations (DC.WEAK_CRYPTO)
/home/brad/working/src/ceph/src/osd/OSD.h: 481 in OSDService::maybe_inject_dispatch_delay()()
475
476 void enqueue_back(spg_t pgid, PGQueueable qi);
477 void enqueue_front(spg_t pgid, PGQueueable qi);
478
479 void maybe_inject_dispatch_delay() {
480 if (g_conf->osd_debug_inject_dispatch_delay_probability > 0) {
>>> CID 1401634: Security best practices violations (DC.WEAK_CRYPTO)
>>> "rand" should not be used for security related applications, as linear congruential algorithms are too easy to break.
481 if (rand() % 10000 <
482 g_conf->osd_debug_inject_dispatch_delay_probability * 10000) {
483 utime_t t;
484 t.set_from_double(g_conf->osd_debug_inject_dispatch_delay_duration);
485 t.sleep();
486 }
** CID 1401635: Incorrect expression (COPY_PASTE_ERROR)
/home/brad/working/src/ceph/src/test/objectstore/store_test.cc: 5915 in StoreTestSpecificAUSize_garbageCollection_Test::TestBody()()
________________________________________________________________________________________________________
*** CID 1401635: Incorrect expression (COPY_PASTE_ERROR)
/home/brad/working/src/ceph/src/test/objectstore/store_test.cc: 5915 in StoreTestSpecificAUSize_garbageCollection_Test::TestBody()()
5909 ASSERT_EQ(statfs.compressed_allocated, 0x20000);
5910 const PerfCounters* counters = store->get_perf_counters();
5911 ASSERT_EQ(counters->get(l_bluestore_gc_merged), 0x20000u);
5912 }
5913 {
5914 struct store_statfs_t statfs;
>>> CID 1401635: Incorrect expression (COPY_PASTE_ERROR)
>>> "overlap_offset" in "(uint64_t)overlap_offset - 1UL" looks like a copy-paste error.
5915 WRITE_AT(write_offset + 1, overlap_offset-1);
5916 int r = store->statfs(&statfs);
5917 ASSERT_EQ(r, 0);
5918 ASSERT_EQ(statfs.compressed_allocated, 0x20000);
5919 const PerfCounters* counters = store->get_perf_counters();
5920 ASSERT_EQ(counters->get(l_bluestore_gc_merged), 0x20000u);
** CID 1401636: (DC.WEAK_CRYPTO)
/home/brad/working/src/ceph/src/test/librbd/test_librbd.cc: 1307 in generate_random_iomap(void *, int, int, int, std::map<unsigned long, unsigned long, std::less<unsigned long>, std::allocator<std::pair<const unsigned long, unsigned long>>> &)()
/home/brad/working/src/ceph/src/test/librbd/test_librbd.cc: 1308 in generate_random_iomap(void *, int, int, int, std::map<unsigned long, unsigned long, std::less<unsigned long>, std::allocator<std::pair<const unsigned long, unsigned long>>> &)()
________________________________________________________________________________________________________
*** CID 1401636: (DC.WEAK_CRYPTO)
/home/brad/working/src/ceph/src/test/librbd/test_librbd.cc: 1307 in generate_random_iomap(void *, int, int, int, std::map<unsigned long, unsigned long, std::less<unsigned long>, std::allocator<std::pair<const unsigned long, unsigned long>>> &)()
1301 ASSERT_EQ(0, rbd_get_stripe_count(image, &stripe_count));
1302
1303 while (max_count-- > 0) {
1304 // generate random image offset based on base random object
1305 // number and object offset and then map that back to an
1306 // object number based on stripe unit and count.
>>> CID 1401636: (DC.WEAK_CRYPTO)
>>> "rand" should not be used for security related applications, as linear congruential algorithms are too easy to break.
1307 uint64_t ono = rand() % num_objects;
1308 uint64_t offset = rand() % (object_size - TEST_IO_SIZE);
1309 uint64_t imageoff = (ono * object_size) + offset;
1310
1311 file_layout_t layout;
1312 layout.object_size = object_size;
/home/brad/working/src/ceph/src/test/librbd/test_librbd.cc: 1308 in generate_random_iomap(void *, int, int, int, std::map<unsigned long, unsigned long, std::less<unsigned long>, std::allocator<std::pair<const unsigned long, unsigned long>>> &)()
1302
1303 while (max_count-- > 0) {
1304 // generate random image offset based on base random object
1305 // number and object offset and then map that back to an
1306 // object number based on stripe unit and count.
1307 uint64_t ono = rand() % num_objects;
>>> CID 1401636: (DC.WEAK_CRYPTO)
>>> "rand" should not be used for security related applications, as linear congruential algorithms are too easy to break.
1308 uint64_t offset = rand() % (object_size - TEST_IO_SIZE);
1309 uint64_t imageoff = (ono * object_size) + offset;
1310
1311 file_layout_t layout;
1312 layout.object_size = object_size;
1313 layout.stripe_unit = stripe_unit;
** CID 1401637: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI30bluestore_compression_header_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401637: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI30bluestore_compression_header_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401637: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401638: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI17bluestore_onode_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401638: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI17bluestore_onode_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401638: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401639: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI26bluestore_extent_ref_map_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401639: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI26bluestore_extent_ref_map_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401639: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401640: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI27bluestore_wal_transaction_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401640: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI27bluestore_wal_transaction_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401640: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401641: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI18bluestore_wal_op_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401641: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI18bluestore_wal_op_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401641: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401642: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI17bluestore_cnode_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401642: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI17bluestore_cnode_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401642: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401643: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI19bluestore_pextent_tE16select_generatedB5cxx11Ej()
________________________________________________________________________________________________________
*** CID 1401643: API usage errors (INVALIDATE_ITERATOR)
/home/brad/working/src/ceph/src/test/encoding/ceph_dencoder.cc: 147 in _ZN12DencoderBaseI19bluestore_pextent_tE16select_generatedB5cxx11Ej()
141 if (i == 0)
142 i = m_list.size();
143 if ((i == 0) || (i > m_list.size()))
144 return "invalid id for generated object";
145 typename list<T*>::iterator p = m_list.begin();
146 for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>> CID 1401643: API usage errors (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "p" though it is already past the end of its container.
147 m_object = *p;
148 return string();
149 }
150
151 bool is_deterministic() override {
152 return !nondeterministic;
** CID 1401644: Integer handling issues (NO_EFFECT)
/include/tracing/librbd.h: 970 in __event_prepare_filter_stack__librbd___aio_writesame_enter()
________________________________________________________________________________________________________
*** CID 1401644: Integer handling issues (NO_EFFECT)
/include/tracing/librbd.h: 970 in __event_prepare_filter_stack__librbd___aio_writesame_enter()
964
965 TRACEPOINT_EVENT(librbd, aio_complete_exit,
966 TP_ARGS(),
967 TP_FIELDS()
968 )
969
>>> CID 1401644: Integer handling issues (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true. "18446744073709551615UL < 0UL".
970 TRACEPOINT_EVENT(librbd, aio_writesame_enter,
971 TP_ARGS(
972 void*, imagectx,
973 const char*, name,
974 const char*, snap_name,
975 char, read_only,
** CID 1401645: Null pointer dereferences (NULL_RETURNS)
/home/brad/working/src/ceph/src/mds/MDCache.cc: 2503 in MDCache::create_subtree_map()()
________________________________________________________________________________________________________
*** CID 1401645: Null pointer dereferences (NULL_RETURNS)
/home/brad/working/src/ceph/src/mds/MDCache.cc: 2503 in MDCache::create_subtree_map()()
2497 ESubtreeMap *le = new ESubtreeMap();
2498 mds->mdlog->_start_entry(le);
2499
2500 map<dirfrag_t, CDir*> dirs_to_add;
2501
2502 if (myin) {
>>> CID 1401645: Null pointer dereferences (NULL_RETURNS)
>>> Assigning: "mydir" = null return value from "get_dirfrag".
2503 CDir* mydir = myin->get_dirfrag(frag_t());
2504 dirs_to_add[mydir->dirfrag()] = mydir;
2505 }
2506
2507 // include all auth subtrees, and their bounds.
2508 // and a spanning tree to tie it to the root.
** CID 1401646: Integer handling issues (NO_EFFECT)
/include/tracing/librbd.h: 187 in __event_prepare_filter_stack__librbd___writesame_enter()
________________________________________________________________________________________________________
*** CID 1401646: Integer handling issues (NO_EFFECT)
/include/tracing/librbd.h: 187 in __event_prepare_filter_stack__librbd___writesame_enter()
181 int, retval),
182 TP_FIELDS(
183 ctf_integer(int, retval, retval)
184 )
185 )
186
>>> CID 1401646: Integer handling issues (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true. "18446744073709551615UL < 0UL".
187 TRACEPOINT_EVENT(librbd, writesame_enter,
188 TP_ARGS(
189 void*, imagectx,
190 const char*, name,
191 const char*, snap_name,
192 char, read_only,
** CID 1401647: (PASS_BY_VALUE)
/usr/include/c++/6.2.1/bits/list.tcc: 484 in std::__cxx11::list<obj_watch_t, std::allocator<obj_watch_t>>::remove_if<librbd::image::RemoveRequest<librbd::MockImageCtx>::filter_out_mirror_watchers()::[lambda(obj_watch_t &) (instance 1)]>(T1)()
/usr/include/c++/6.2.1/bits/list.tcc: 484 in std::__cxx11::list<obj_watch_t, std::allocator<obj_watch_t>>::remove_if<librbd::image::RemoveRequest<librbd::ImageCtx>::filter_out_mirror_watchers()::[lambda(obj_watch_t &) (instance 1)]>(T1)()
________________________________________________________________________________________________________
*** CID 1401647: (PASS_BY_VALUE)
/usr/include/c++/6.2.1/bits/list.tcc: 484 in std::__cxx11::list<obj_watch_t, std::allocator<obj_watch_t>>::remove_if<librbd::image::RemoveRequest<librbd::MockImageCtx>::filter_out_mirror_watchers()::[lambda(obj_watch_t &) (instance 1)]>(T1)()
478 }
479
480 template<typename _Tp, typename _Alloc>
481 template <typename _Predicate>
482 void
483 list<_Tp, _Alloc>::
>>> CID 1401647: (PASS_BY_VALUE)
>>> Passing parameter __pred of type "librbd::image::RemoveRequest<librbd::MockImageCtx>::filter_out_mirror_watchers()::[lambda(obj_watch_t &) (instance 1)]" (size 280 bytes) by value.
484 remove_if(_Predicate __pred)
485 {
486 iterator __first = begin();
487 iterator __last = end();
488 while (__first != __last)
489 {
/usr/include/c++/6.2.1/bits/list.tcc: 484 in std::__cxx11::list<obj_watch_t, std::allocator<obj_watch_t>>::remove_if<librbd::image::RemoveRequest<librbd::ImageCtx>::filter_out_mirror_watchers()::[lambda(obj_watch_t &) (instance 1)]>(T1)()
478 }
479
480 template<typename _Tp, typename _Alloc>
481 template <typename _Predicate>
482 void
483 list<_Tp, _Alloc>::
>>> CID 1401647: (PASS_BY_VALUE)
>>> Passing parameter __pred of type "librbd::image::RemoveRequest<librbd::ImageCtx>::filter_out_mirror_watchers()::[lambda(obj_watch_t &) (instance 1)]" (size 280 bytes) by value.
484 remove_if(_Predicate __pred)
485 {
486 iterator __first = begin();
487 iterator __last = end();
488 while (__first != __last)
489 {
** CID 1401648: (RESOURCE_LEAK)
/home/brad/working/src/ceph/src/tools/rbd_mirror/InstanceWatcher.cc: 92 in rbd::mirror::InstanceWatcher<librbd::ImageCtx>::remove_instance(librados::IoCtx &, ContextWQ *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, Context *)()
/home/brad/working/src/ceph/src/tools/rbd_mirror/InstanceWatcher.cc: 92 in rbd::mirror::InstanceWatcher<librbd::<unnamed>::MockTestImageCtx>::remove_instance(librados::IoCtx &, ContextWQ *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, Context *)()
________________________________________________________________________________________________________
*** CID 1401648: (RESOURCE_LEAK)
/home/brad/working/src/ceph/src/tools/rbd_mirror/InstanceWatcher.cc: 92 in rbd::mirror::InstanceWatcher<librbd::ImageCtx>::remove_instance(librados::IoCtx &, ContextWQ *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, Context *)()
86 ContextWQ *work_queue,
87 const std::string &instance_id,
88 Context *on_finish) {
89 auto req = new RemoveInstanceRequest<I>(io_ctx, work_queue, instance_id,
90 on_finish);
91 req->send();
>>> CID 1401648: (RESOURCE_LEAK)
>>> Variable "req" going out of scope leaks the storage it points to.
92 }
93
94 template <typename I>
95 InstanceWatcher<I>::InstanceWatcher(librados::IoCtx &io_ctx,
96 ContextWQ *work_queue,
97 const boost::optional<std::string> &id)
/home/brad/working/src/ceph/src/tools/rbd_mirror/InstanceWatcher.cc: 92 in rbd::mirror::InstanceWatcher<librbd::<unnamed>::MockTestImageCtx>::remove_instance(librados::IoCtx &, ContextWQ *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, Context *)()
86 ContextWQ *work_queue,
87 const std::string &instance_id,
88 Context *on_finish) {
89 auto req = new RemoveInstanceRequest<I>(io_ctx, work_queue, instance_id,
90 on_finish);
91 req->send();
>>> CID 1401648: (RESOURCE_LEAK)
>>> Variable "req" going out of scope leaks the storage it points to.
92 }
93
94 template <typename I>
95 InstanceWatcher<I>::InstanceWatcher(librados::IoCtx &io_ctx,
96 ContextWQ *work_queue,
97 const boost::optional<std::string> &id)
** CID 1401649: Null pointer dereferences (REVERSE_INULL)
/home/brad/working/src/ceph/src/osd/OSD.cc: 6061 in OSD::maybe_share_map(Session *, boost::intrusive_ptr<OpRequest>, std::shared_ptr<const OSDMap>)()
________________________________________________________________________________________________________
*** CID 1401649: Null pointer dereferences (REVERSE_INULL)
/home/brad/working/src/ceph/src/osd/OSD.cc: 6061 in OSD::maybe_share_map(Session *, boost::intrusive_ptr<OpRequest>, std::shared_ptr<const OSDMap>)()
6055 const Message *m = op->get_req();
6056 service.share_map(
6057 m->get_source(),
6058 m->get_connection().get(),
6059 op->sent_epoch,
6060 osdmap,
>>> CID 1401649: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "session" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
6061 session ? &last_sent_epoch : NULL);
6062
6063 session->sent_epoch_lock.lock();
6064 if (session->last_sent_epoch < last_sent_epoch) {
6065 session->last_sent_epoch = last_sent_epoch;
6066 }
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRaGCnxtQO9E3gxlB2GxVsWFENryh7bC5hIb-2FQBVM85YLQ-3D-3D_2sw0G7ICm9mxCh1lYW1t9y1lfDrIerWzLwB67LZ-2Bn8Eo0ddxQLgim1t9h3RZhGlTH-2BvBf3jux2qSsSeJcAE-2FT1-2FrKYdyzl7Dvnz3caEpQ4qrEJDkuGcNtcFN7wsACxMoY264sCzoQRXTq29tL1VL4o6pqhnDs9CwbVoH8wC6jb-2BRFs-2F8H6SKtQhFuYUqEAq5UVf4MYC7TyGLOH413WfbWA4jt9vqmVYoJ9EyPJMlaFU-3D
To manage Coverity Scan email notifications for "ceph-devel@vger.kernel.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4Bco8jcmzhh7FSyvoR0E3-2BDgRcBCQ6OuthHBtaTCGNq9zoLsiw8NWrIF2zsdhfTt-2FbHjZ2ToL3Et9v1-2BrDLungAOjHpQtOY-2BsyLiTVCQEUCU-3D_2sw0G7ICm9mxCh1lYW1t9y1lfDrIerWzLwB67LZ-2Bn8Eo0ddxQLgim1t9h3RZhGlTH-2BvBf3jux2qSsSeJcAE-2FT3L3Enill0f-2F8s7t6KnAn6mcAIv1GHFiHZsl8cDdSTZSfnNlxpTtxRfQ-2BEUwpAGaxhmHSvI0kmth3rj9nvuZ6yCMxyFu674aqXNqVmOHPgPCa6MjRxMXcFGv-2Fp9se3qn3oz8VOPdt-2BDrJuGhaEaiNA4-3D
next reply other threads:[~2017-03-02 7:54 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 7:44 scan-admin [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-20 12:22 New Defects reported by Coverity Scan for ceph scan-admin
2022-08-20 13:17 ` Jeff Layton
2022-08-22 3:54 ` Brad Hubbard
2022-08-23 12:52 ` Jeff Layton
2018-01-04 3:32 scan-admin
2017-12-28 1:57 scan-admin
2017-12-21 1:54 scan-admin
2017-12-21 3:34 ` Jos Collin
2017-12-21 4:03 ` Brad Hubbard
2017-12-14 6:49 scan-admin
2017-12-01 2:25 scan-admin
2017-11-23 0:19 scan-admin
2017-11-16 11:35 scan-admin
2017-11-09 11:36 scan-admin
2017-11-02 2:11 scan-admin
2017-10-27 0:31 scan-admin
2017-10-19 3:54 scan-admin
2017-10-12 5:54 scan-admin
2017-10-05 5:08 scan-admin
2017-09-28 5:09 scan-admin
2017-09-21 6:44 scan-admin
2017-09-14 7:19 scan-admin
2017-09-07 5:08 scan-admin
2017-08-31 6:39 scan-admin
2017-08-24 23:32 scan-admin
2017-08-17 3:29 scan-admin
2017-08-10 3:50 scan-admin
2017-08-03 4:57 scan-admin
2017-07-27 3:50 scan-admin
2017-07-28 18:42 ` Gregory Farnum
2017-07-28 22:22 ` Brad Hubbard
2017-07-20 4:08 scan-admin
2017-07-13 5:11 scan-admin
2017-07-06 5:03 scan-admin
2017-06-29 4:08 scan-admin
2017-06-22 4:27 scan-admin
2017-06-15 9:50 scan-admin
2017-06-11 23:46 scan-admin
2017-06-01 4:33 scan-admin
2017-05-25 6:22 scan-admin
2017-05-18 1:44 scan-admin
2017-05-11 5:32 scan-admin
2017-05-04 2:45 scan-admin
2017-04-27 2:22 scan-admin
2017-04-20 5:34 scan-admin
2017-04-13 6:25 scan-admin
2017-04-06 9:40 scan-admin
2017-03-31 1:25 scan-admin
2017-03-23 7:58 scan-admin
2017-03-16 7:37 scan-admin
2017-03-09 6:12 scan-admin
2017-02-23 9:09 scan-admin
2017-02-17 2:29 scan-admin
[not found] ` <CAJE9aOMoxWjhq=g+25hfhMhxSCnHAOwAyNhXvkxS1wwBEd3j+A@mail.gmail.com>
2017-02-17 5:19 ` kefu chai
2017-02-05 10:08 scan-admin
2017-01-27 13:22 scan-admin
2017-01-17 3:01 scan-admin
2017-01-09 10:05 scan-admin
2016-12-30 8:33 scan-admin
2016-12-23 9:16 scan-admin
2016-12-16 8:54 scan-admin
2016-12-09 11:29 scan-admin
2016-12-02 11:08 scan-admin
2016-11-25 7:55 scan-admin
2016-03-19 17:58 scan-admin
2016-03-13 17:40 scan-admin
2016-03-12 18:04 scan-admin
2016-03-05 17:55 scan-admin
2016-03-07 20:59 ` Gregory Farnum
2016-02-27 18:07 scan-admin
2016-02-20 18:26 scan-admin
2016-02-18 20:32 scan-admin
2016-02-13 17:47 scan-admin
2016-02-11 17:57 scan-admin
2016-02-11 22:01 ` Gregory Farnum
2016-02-12 16:36 ` Adam C. Emerson
2016-02-04 20:39 scan-admin
2016-02-03 20:40 scan-admin
2015-05-02 14:37 scan-admin
2015-01-21 1:41 scan-admin
2015-01-16 14:39 scan-admin
2015-01-16 15:17 ` Gregory Farnum
2015-01-16 16:00 ` John Spray
2015-01-16 16:08 ` Sage Weil
[not found] <54b528bef1f63_1b74f3532c63410@scan.coverity.com.mail>
2015-01-13 14:34 ` Sage Weil
2015-01-13 14:16 scan-admin
2015-01-10 14:36 scan-admin
2015-01-10 15:48 ` Haomai Wang
2015-01-09 14:30 scan-admin
2015-01-09 15:26 ` Sage Weil
2015-01-09 15:32 ` Danny Al-Gaaf
2015-01-04 14:14 scan-admin
2014-12-27 14:13 scan-admin
2014-12-28 6:03 ` Sage Weil
2014-12-26 14:19 scan-admin
2014-12-23 14:37 scan-admin
2014-12-21 14:13 scan-admin
2014-12-18 14:19 scan-admin
2014-12-14 14:17 scan-admin
2014-12-07 20:36 scan-admin
2014-12-05 14:11 scan-admin
2014-12-02 14:09 scan-admin
2014-11-25 14:09 scan-admin
2014-11-23 14:08 scan-admin
2014-11-20 14:20 scan-admin
2014-11-14 14:21 scan-admin
2014-11-13 14:21 scan-admin
2014-11-11 20:40 scan-admin
2014-11-09 14:12 scan-admin
2014-10-30 13:19 scan-admin
2014-10-30 16:08 ` Sage Weil
2014-10-28 13:16 scan-admin
2014-10-28 18:26 ` Danny Al-Gaaf
2014-10-26 13:17 scan-admin
2014-10-24 17:55 scan-admin
2014-10-24 17:59 ` Sage Weil
2014-10-17 13:27 scan-admin
2014-10-09 13:23 scan-admin
2014-10-02 13:21 scan-admin
2014-09-25 13:18 scan-admin
2014-09-16 21:40 scan-admin
2014-08-16 21:31 scan-admin
2014-08-09 15:30 scan-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58b7cd62dde19_5e3a12f732070268@ss1435.mail \
--to=scan-admin@coverity.com \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox