Skip to content

Wip 15225#1

Merged
smithfarm merged 3 commits intosmithfarm:wip-s390-rgwfrom
tchaikov:wip-15225
May 29, 2017
Merged

Wip 15225#1
smithfarm merged 3 commits intosmithfarm:wip-s390-rgwfrom
tchaikov:wip-15225

Conversation

@tchaikov
Copy link

tchaikov added 3 commits May 29, 2017 15:03
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
@smithfarm smithfarm merged commit aedea8a into smithfarm:wip-s390-rgw May 29, 2017
smithfarm pushed a commit that referenced this pull request Jun 25, 2017
Fixes The Coverity Scan Report:
CID 1412577 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
35. divide_by_zero: In expression (float)mk / k, division by expression k which may be zero has undefined behavior.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jun 26, 2017
Fixes the Coverity Scan Report:
CID 1411820 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
9. divide_by_zero: In expression bl.length() * i / sum, division by expression sum which may be zero has undefined behavior.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 1, 2017
Fixes the coverity scan report:
1412839 Uninitialized pointer field
CID 1412839 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)2. uninit_member: Non-static
class member array is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 1, 2017
Fixes the Coverity Scan Report:
CID 1412617 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
3. uninit_member: Non-static class member field_aliases is not initialized in this constructor nor in any functions that it calls.
5. uninit_member: Non-static class member restricted_fields is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 1, 2017
Fixes the Coverity Scan Report:
CID 1412616 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member worker is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 1, 2017
Fixed the Coverity Scan Report:
CID 1412615 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member val is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 1, 2017
…t::parse_option()

Fixes the Coverity Scan Report:
CID 1412776 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)19. var_deref_model: Passing null pointer option_name to operator <<, which dereferences it.

Fixed the review comments too in this commit.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 17, 2017
Fixes the Coverity Scan Report:
CID 1351737 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member worker is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 17, 2017
Fixes the Coverity Scan Report:
CID 1352180 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member field fs.rgw is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Jul 17, 2017
Fixes the Coverity Scan Report:
CID 1396146 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member max_objs is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member obj_names is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
smithfarm pushed a commit that referenced this pull request Aug 1, 2017
Fixed:

** CID 1351525 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
7. negative_returns: sd is passed to a parameter that cannot be negative.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
I'm seeing sporadic single thread deadlocks on fio stat_mutex during krbd
thrash runs:

  (gdb) info threads
    Id   Target Id         Frame
  * 1    Thread 0x7f89ee730740 (LWP 15604) 0x00007f89ed9f41bd in __lll_lock_wait () from /lib64/libpthread.so.0
  (gdb) bt
  #0  0x00007f89ed9f41bd in __lll_lock_wait () from /lib64/libpthread.so.0
  #1  0x00007f89ed9f17b2 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  #2  0x00000000004429b9 in fio_mutex_down (mutex=0x7f89ee72d000) at mutex.c:170
  #3  0x0000000000459704 in thread_main (data=<optimized out>) at backend.c:1639
  #4  0x000000000045b013 in fork_main (offset=0, shmid=<optimized out>, sk_out=0x0) at backend.c:1778
  #5  run_threads (sk_out=sk_out@entry=0x0) at backend.c:2195
  #6  0x000000000045b47f in fio_backend (sk_out=sk_out@entry=0x0) at backend.c:2400
  #7  0x000000000040cb0c in main (argc=2, argv=0x7fffad3e3888, envp=<optimized out>) at fio.c:63
  (gdb) up 2
  170                     pthread_cond_wait(&mutex->cond, &mutex->lock);
  (gdb) p mutex.lock.__data.__owner
  $1 = 15604

Upgrading to 2.21 seems to make these go away.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:

** CID 1409697 (#1 of 1): Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
1. assign_where_compare_meant: use of "=" where "==" may have been intended
2. primary_file: During compilation of file '/src/rgw/librgw.cc'

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:

** CID 1395347 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
3. negative_returns: fd is passed to a parameter that cannot be negative

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:

** CID 1403249 (#1 of 1): Uninitialized scalar variable (UNINIT)
6. uninit_use: Using uninitialized value snap_protected.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:

** CID 1402141 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member reopen is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:

** CID 1402142 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member ops_allowance is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:
** 1405280 Explicit null dereferenced
CID 1405280 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
20. var_deref_model: Passing null pointer diri to check_access, which dereferences it.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixed:

** 1405291 Explicit null dereferenced.
CID 1405291 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
10. var_deref_op: Dereferencing null pointer s.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixes the Coverity Scan Report:

** 1414521 Uninitialized scalar field
CID 1414521 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
3. uninit_member: Non-static class member m_writeRc is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixes:

1414515 Uninitialized pointer field
CID 1414515 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
22. uninit_member: Non-static class member perf_counter is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixes:

1244200 Uninitialized pointer field
CID 1244200 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member msg is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixes:

** 717285 Uninitialized scalar field
CID 717285 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixes coverity Issue:

** 717293 Uninitialized scalar field
2. uninit_member: Non-static class member table is not initialized in this constructor nor in any functions that it calls.
  	4. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.

CID 717293 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member reqid is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 7, 2017
Fixes coverity Issue:

** 717296 Uninitialized scalar field
CID 717296 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member handle is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 1188168 Uninitialized scalar field
CID 1188168 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member success is not initialized
in this constructor nor in any functions that it calls.

** 1188169 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
in this constructor nor in any functions that it calls.
CID 1188169 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.

** 1188170 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
in this constructor nor in any functions that it calls.
CID 1188170 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.

** 1188171 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
in this constructor nor in any functions that it calls.
CID 1188171 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.

** 1188172 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
 in this constructor nor in any functions that it calls.
CID 1188172 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
 in this constructor nor in any functions that it calls.

** 1188173 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
 in this constructor nor in any functions that it calls.
CID 1188173 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity Issue:

** 1322815 Uninitialized pointer field
CID 1322815 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_sem is not initialized
in this constructor nor in any functions that it calls.

** 1322816 Uninitialized pointer field
CID 1322816 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_sem is not initialized
in this constructor nor in any functions that it calls.

** 1322817 Uninitialized pointer field
CID 1322817 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_sem is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity Issue:

** 717286 Uninitialized scalar field
CID 717286 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member tid is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 1351715 Uninitialized scalar field
5. uninit_member: Non-static class member m_state is not initialized in this
constructor nor in any functions that it calls.
7. uninit_member: Non-static class member m_copyup_start is not initialized
in this constructor nor in any functions that it calls.
CID 1351715 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
9. uninit_member: Non-static class member m_copyup_end is not initialized
in this constructor nor in any functions that it calls.

** 1351724 Uninitialized scalar field
CID 1351724 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_state is not initialized in
this constructor nor in any functions that it calls.

** 1351725 Uninitialized scalar field
CID 1351725 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_state is not initialized in
this constructor nor in any functions that it calls.

** 1351726 Uninitialized scalar field
CID 1351726 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
3. uninit_member: Non-static class member m_state is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 1351727 Uninitialized scalar field
CID 1351727 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_state is not initialized in
this constructor nor in any functions that it calls.

** 1351728 Uninitialized scalar field
CID 1351728 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_state is not initialized in
this constructor nor in any functions that it calls.

** 1351733 Uninitialized scalar field
CID 1351733 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member snap_id is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 1409698 Uninitialized pointer field
2. uninit_member: Non-static class member cluster is not initialized in
this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member ioctx is not initialized in
this constructor nor in any functions that it calls.
CID 1409698 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
6. uninit_member: Non-static class member alignment is not initialized
in this constructor nor in any functions that it calls.

** 1409699 Uninitialized pointer field
2. uninit_member: Non-static class member cluster is not initialized in
 this constructor nor in any functions that it calls.
CID 1409699 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
4. uninit_member: Non-static class member ioctx is not initialized in
this constructor nor in any functions that it calls.

** 1409701 Uninitialized pointer field
2. uninit_member: Non-static class member cluster is not initialized in
this constructor nor in any functions that it calls.
CID 1409701 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
4. uninit_member: Non-static class member ioctx is not initialized in
this constructor nor in any functions that it calls.

** 1409703 Uninitialized pointer field
2. uninit_member: Non-static class member cluster is not initialized in
this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member ioctx is not initialized in
this constructor nor in any functions that it calls.
CID 1409703 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
6. uninit_member: Non-static class member alignment is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issue:

** 717269 Uninitialized scalar field
CID 717269 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member is_primary is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 1355242 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.
CID 1355242 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member rep_tid is not initialized
in this constructor nor in any functions that it calls.

** 1355243 Uninitialized scalar field
2. uninit_member: Non-static class member map_epoch is not initialized
in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.
CID 1355243 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member rep_tid is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 1398907 Uninitialized scalar field
CID 1398907 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member tag_tid is not initialized in
this constructor nor in any functions that it calls.

** 1398906 Uninitialized scalar field
22. uninit_member: Non-static class member m_r_saved is not initialized in
this constructor nor in any functions that it calls.
CID 1398906 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
24. uninit_member: Non-static class member m_mirror_mode is not initialized
in this constructor nor in any functions that it calls.

** 1399592 Uninitialized scalar field
2. uninit_member: Non-static class member m_order is not initialized in this
constructor nor in any functions that it calls.
4. uninit_member: Non-static class member m_size is not initialized in this
constructor nor in any functions that it calls.
6. uninit_member: Non-static class member m_features is not initialized in
this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member m_incompatible_features is not
initialized in this constructor nor in any functions that it calls.
10. uninit_member: Non-static class member m_flags is not initialized in
this constructor nor in any functions that it calls.
CID 1399592 (#1-2 of 2): Uninitialized scalar field (UNINIT_CTOR)
12. uninit_member: Non-static class member m_exclusive_locked is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issues:

** 717271 Uninitialized scalar field
2. uninit_member: Non-static class member from_mds is not initialized
 in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member dir_rep is not initialized
 in this constructor nor in any functions that it calls.
CID 717271 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member discover is not initialized
 in this constructor nor in any functions that it calls.

** 717272 Uninitialized scalar field
2. uninit_member: Non-static class member want_base_dir is not initialized
in this constructor nor in any functions that it calls.
CID 717272 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member want_xlocked is not initialized
in this constructor nor in any functions that it calls.

** 717274 Uninitialized scalar field
2. uninit_member: Non-static class member wanted_base_dir is not initialized
 in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member wanted_xlocked is not initialized
 in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member flag_error_dn is not initialized
 in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member flag_error_dir is not initialized
 in this constructor nor in any functions that it calls.
10. uninit_member: Non-static class member unsolicited is not initialized
 in this constructor nor in any functions that it calls.
12. uninit_member: Non-static class member dir_auth_hint is not initialized
 in this constructor nor in any functions that it calls.
CID 717274 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
14. uninit_member: Non-static class member starts_with is not initialized
in this constructor nor in any functions that it calls.

** 717275 Uninitialized scalar field
CID 717275 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member from is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issue:

** 717332 Uninitialized pointer field
2. uninit_member: Non-static class member field iocb.data is not
initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member field iocb.key is not
initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member field iocb.__pad2 is not
initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member field iocb.aio_lio_opcode
is not initialized in this constructor nor in any functions that it calls.
10. uninit_member: Non-static class member field iocb.aio_reqprio
is not initialized in this constructor nor in any functions that it calls.

CID 717332 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
12. uninit_member: Non-static class member field iocb.aio_fildes is not
initialized in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 22, 2017
Fixes the coverity issue:

** 1322812 Uninitialized pointer field
CID 1322812 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member cls is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 28, 2017
Fixes te coveity issue:

** 1316251 Uninitialized pointer field
CID 1316251 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member mon_client is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 30, 2017
Fixes the coverity issue:

** 1396142 Uninitialized scalar field
CID 1396142 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member max_aio is not initialized in
this constructor nor in any functions that it calls.

** 1396205 Uninitialized scalar field
CID 1396205 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member is_master is not initialized
in this constructor nor in any functions that it calls.

** 1396150 Uninitialized scalar field
CID 1396150 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member size is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 30, 2017
** 1351688 Uninitialized pointer field

2. uninit_member: Non-static class member server is not initialized
in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member field request.magic is not
initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member field request.type is not
initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member field request.from is not
initialized in this constructor nor in any functions that it calls.
10. uninit_member: Non-static class member field request.len is not
initialized in this constructor nor in any functions that it calls.
12. uninit_member: Non-static class member field reply.magic is not
initialized in this constructor nor in any functions that it calls.
14. uninit_member: Non-static class member field reply.error is not
initialized in this constructor nor in any functions that it calls.

CID 1351688 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
16. uninit_member: Non-static class member command is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 30, 2017
Fixes the coverity issue:

** 1219467 Division or modulo by zero
CID 1219467 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
74. divide_by_zero: In expression 100 / atoi(args[i + 1U]), division
 by expression atoi(args[i + 1U]) which may be zero has undefined behavior.

Signed-off-by: Amit Kumar amitkuma@redhat.com
smithfarm pushed a commit that referenced this pull request Aug 30, 2017
Fixes the coverity issue:

** 1394832 Logically dead code
cannot_single: At condition r, the value of r
cannot be equal to 0.
dead_error_condition: The condition r must be true.
CID 1394832 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach the expression
-22 inside this statement: return r ? 0 : -22;.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
smithfarm pushed a commit that referenced this pull request Aug 30, 2017
Fixes the coverity issue:

** 1352097 Structurally dead code

CID 1352097 (#1 of 1): Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: return ceph::shunique_lock<...

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
smithfarm pushed a commit that referenced this pull request Aug 31, 2017
Fixes the coverity issue:

** 1415775 Logically dead code
Here r cannot be less than 0.
CID 1415775 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return r;

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
smithfarm pushed a commit that referenced this pull request Sep 4, 2017
Fixes the coverity issues:

** 1352181 Uninitialized scalar field
2. uninit_member: Non-static class member field fh_hk.bucket is
not initialized in this constructor nor in any functions that it calls.
CID 1352181 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member field fh_hk.object is
not initialized in this constructor nor in any functions that it calls.

** 1353424 Uninitialized scalar field
CID 1353424 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
5. uninit_member: Non-static class member watch_handle is not initialized
 in this constructor nor in any functions that it calls.

** 1355240 Uninitialized scalar field
CID 1355240 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member index_type is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
since it isn't used

Fix for:

CID 1394854 (#1 of 1): 'Constant' variable guards dead code (DEADCODE)
 dead_error_line: Execution cannot reach this statement:
 opts->set(RBD_IMAGE_OPTION_....
 Local variable features_set_specified is assigned only once, to a
 constant value, making it effectively constant throughout its scope.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Don't call put_request() twice, it's already called by
unregister_request()

Fix for:

CID 1405360 (#1 of 1): Use after free (USE_AFTER_FREE)
 deref_arg: Calling put_request dereferences freed pointer request

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
calloc() does not take negative values, check return value from
get_max_buckets() and handle it correctly.

Fix for:

CID 1405301 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
 negative_returns: arg_map.size is passed to a parameter that cannot
 be negative.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Fix for:

CID 1406088 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
 uninit_member: Non-static class member root_ancestor is not
 initialized in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Fix for:

CID 717207 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
 uninit_member: Non-static class member dirp is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Fix for:

CID 1405070 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405071 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405073 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405074 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405075 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405077 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405083 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405086 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
CID 1405087 (#1 of 1): Memset fill value of '0' (NO_EFFECT)
 bad_memset: "memset" with fill value "'0'" (the zero character).
 memset(&net, 48, 28UL). (CWE-665)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Fix for:

CID 1396232 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)
 nonvirtual_dtor: Class librbd::<unnamed>::SafeTimerSingleton has a
 destructor and a pointer to it is upcast to class SafeTimer which
 doesn't have a virtual destructor.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Fix for:

CID 1402624 (#1 of 1): Uninitialized scalar variable (UNINIT)
 uninit_use: Using uninitialized value sin. Field sin.sin_zero is
 uninitialized.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
CID 1219593 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable completion going out of scope leaks
 the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
smithfarm pushed a commit that referenced this pull request Sep 6, 2017
Fix for:

CID 1313405 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable my_completion2 going out of scope
 leaks the storage it points to.

CID 1219522 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable my_completion going out of scope
 leaks the storage it points to.

CID 1219501 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable my_completion going out of scope
 leaks the storage it points to.

CID 1313406 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable my_completion2 going out of scope
 leaks the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants