summaryrefslogtreecommitdiff
path: root/lib/netdev-bsd.c
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2016-04-06 16:28:51 -0700
committerDaniele Di Proietto <diproiettod@vmware.com>2016-04-06 19:32:34 -0700
commit91644f45c6280b12f72af1f55bf8a83fccc04b1b (patch)
tree7b7a2ea45e76c2c3627796bb3eff382a2a4fa6db /lib/netdev-bsd.c
parentbc8f7c35c02cfb6d0a369d9a25d3899777b62ec0 (diff)
downloadopenvswitch-91644f45c6280b12f72af1f55bf8a83fccc04b1b.tar.gz
dp-packet: Fix use of uninitialised value at emc_lookup.
Valgrind reports "Conditional jump or move depends on uninitialised value" and "Use of uninitialised value" at case 2016 ovn -- 3 HVs, 1 LS, 3 lports/HV. It is caused by 1) assigning an uninitialized value to 'key->hash' at emc_processing(). Due to uninit rss_hash_valid, dp_packet_rss_valid() might return true and undefined hash value is returned, and 2) at emc_lookup, the 'current_entry->key.hash' could be uninitialized due to dp_packet_clone(). The patch fixes the two and as a result, a couple of calls to dp_packet_rss_invalidate() become redundant and thus are removed. Call stacks: - Connditional jump or move depends on uninitialised value(s) dpif_netdev_packet_get_rss_hash (dpif-netdev.c:3334) emc_processing (dpif-netdev.c:3455) dp_netdev_input__ (dpif-netdev.c:3639) and, - Use of uninitialised value of size 8 emc_lookup (dpif-netdev.c:1785) emc_processing (dpif-netdev.c:3457) dp_netdev_input__ (dpif-netdev.c:3639) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Diffstat (limited to 'lib/netdev-bsd.c')
-rw-r--r--lib/netdev-bsd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index 75bd5a3c3..49c05f499 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -641,7 +641,6 @@ netdev_bsd_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
dp_packet_delete(packet);
} else {
dp_packet_pad(packet);
- dp_packet_rss_invalidate(packet);
packets[0] = packet;
*c = 1;
}