mbox series

[ovs-dev,v16,0/2] treewide: Fix multiple Coverity defects

Message ID 20230903152155.753998-1-jamestiotio@gmail.com
Headers show
Series treewide: Fix multiple Coverity defects | expand

Message

James Raphael Tiovalen Sept. 3, 2023, 3:21 p.m. UTC
This cleanup patchset addresses several high and medium-impact Coverity
defects.

Unit tests have been successfully executed via `make check` and they
successfully passed.

The list of revisions so far:

v2:
Fix some apply-robot checkpatch errors and warnings.

v3:
Fix some apply-robot checkpatch errors and warnings.

v4:
- Fix some apply-robot checkpatch errors and warnings.
- Fix github-robot build failure: linux clang test asan.

v5:
Improve commit message to better describe the intent of this patch.

v6:
- Convert some explicit null pointer checks to assertions since they are
checking for impossible conditions.
- Use `nullable_memset()` and `nullable_memcpy()` instead of manually
performing null checks for `memset()` and `memcpy()`.

v7:
- Split the single commit into a patch series which consists of 8
patches to make it easier to review and help keep things organized.
- Incorporated feedback from Aaron Conole.

v8:
Incorporated feedback from Simon Horman and Ilya Maximets.

v9:
Fix warning for patch 2/8 due to using `sizeof` on a void pointer.

v10:
Resolve merge conflict for patch 8/8.

v11:
Fix order of calling `ovs_assert` before `memset` in patch 2/8.

v12:
Fix failure of some tests in patch 4/8 by checking for warning logs in
OVSDB_SERVER_SHUTDOWN.

v13:
- Incorporated feedback from Eelco Chaudron and Ilya Maximets.
- Regrouped some changes between patches 3/4 and 4/4.

v14:
Fix inaccurate commit message for patches 2/4 and 3/4.

v15:
Incorporate feedback from Eelco, Aaron, and Ilya.

v16:
Fix -Wmaybe-uninitialized compiler warning for patch 2/2.

James Raphael Tiovalen (2):
  lib: Add non-null assertions to some return values of `dp_packet_data`
  lib, ovsdb, vtep: Add various null pointer checks

 lib/dp-packet.c         | 25 ++++++++++++++++---------
 lib/dpctl.c             | 12 ++++++++++++
 lib/netdev-native-tnl.c |  6 +++++-
 lib/pcap-file.c         |  4 +++-
 lib/shash.c             |  4 ++++
 lib/sset.c              |  5 +++++
 ovsdb/jsonrpc-server.c  |  2 +-
 ovsdb/monitor.c         |  3 +++
 ovsdb/ovsdb-client.c    |  6 ++++--
 ovsdb/row.c             |  5 ++++-
 vtep/vtep-ctl.c         | 17 +++++++++--------
 11 files changed, 66 insertions(+), 23 deletions(-)

--
2.42.0