This patch adds an assortment of `ovs_assert` statements to check for
null pointers. We use assertions since it should be impossible for any
of these pointers to be NULL.
Signed-off-by: James Raphael Tiovalen
Reviewed-by: Simon Horman
---
lib/dp-packet.c| 1 +
lib/dpctl.c|
In the case where routing is enabled, the bridge member of the
`vsctl_port` structs is not populated. This can cause a crash if we
attempt to access it. This patch fixes the crash by checking if the
bridge member is valid before attempting to access it. In the
`check_conflicts` function, we print
This commit adds various null pointer checks to some files in the `lib`
and the `ovsdb` directories to fix several Coverity defects. These
changes are grouped together as they perform similar checks, returning
early or skipping some action if a null pointer is encountered.
Signed-off-by: James
This commit adds non-null pointer assertions in some code that performs
some decisions based on old and new input ovsdb_rows.
Signed-off-by: James Raphael Tiovalen
Reviewed-by: Simon Horman
---
ovsdb/file.c| 2 ++
ovsdb/monitor.c | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
This commit adds a few null pointer assertions and checks to some return
values of `ovsdb_table_schema_get_column`. If a null pointer is
encountered in these blocks, either the assertion will fail or the
control flow will now be redirected to alternative paths which will
output the appropriate
This commit adds assertions in the functions `shash_count`,
`simap_count`, and `smap_count` to ensure that the corresponding input
struct pointer is not NULL.
This ensures that if the return values of `shash_sort`, `simap_sort`,
or `smap_sort` are NULL, then the following for loops would not
This commit adds some `ovs_assert()` checks to some return values of
`dp_packet_data()` to ensure that they are not NULL and to prevent
null-pointer dereferences, which might lead to unwanted crashes. We use
assertions since it should be impossible for these calls to
`dp_packet_data()` to return
This commit adds zero-initializations by changing `SFL_ALLOC` from
`malloc` to `xzalloc`, adding a `memset` call to `sflAlloc`,
initializing a `pollfd` struct variable with zeroes, and changing some
calls to `xmalloc` to `xzalloc`. This is to prevent potential data leaks
or undefined behavior from
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
On Wed, May 24, 2023 at 12:20 AM Simon Horman wrote:
>
> On question about this.
>
> memset() is passed alloc before the call to ovs_assert().
> From the POV of the safety you are implementing, is that ok?
Ah right, apologies for that. It seems that I overlooked the order.
`ovs_assert` should be
push_dp_ops only handles delete ops errors but ignores the modify
ops results. It's better to handle all the dp operation errors in
a consistent way.
This patch prevents the inconsistency by considering modify failure
in revalidators.
To note, we cannot perform two state transitions and change
Recently I have identified the real root cause for this inconsistency
between ukey and megaflow actions.
I thus decided to withdraw this version and change its commits.
Will send a v10.
Please do not review this version.
0-day Robot 于2023年6月2日周五 23:19写道:
> Bleep bloop. Greetings Peng He, I am
Hi Eli,
Thanks for reviewing this. Please see below.
On Tue, 21 Feb 2023, Eli Britstein wrote:
-Original Message-
From: Ivan Malov
Sent: Tuesday, 21 February 2023 2:41
To: ovs-dev@openvswitch.org
Cc: Ilya Maximets ; Eli Britstein ; Ori
Kam ; David Marchand
Subject: [PATCH v4 3/3]
13 matches
Mail list logo