diff options
author | Daniele Di Proietto <diproiettod@vmware.com> | 2016-10-31 14:52:43 -0700 |
---|---|---|
committer | Daniele Di Proietto <diproiettod@vmware.com> | 2016-11-14 17:24:34 -0800 |
commit | 44975bb06f6476e18d7c5a06947650eee10a830e (patch) | |
tree | e021a1886e6115a6356e8e73c91d0b409ba41ae3 /lib | |
parent | 63906f18d71318623307914dc99ad28acfeff399 (diff) | |
download | openvswitch-44975bb06f6476e18d7c5a06947650eee10a830e.tar.gz |
netdev-dpdk: Fix crash in QoS.
qos_conf can be NULL. This can be easily reproduced by setting egress
QoS on a port:
```
ovs-vsctl set port dpdk2 qos=@newqos -- --id=@newqos create qos
type=egress-policer other-config:cir=46000000 other-config:cbs=2048
```
Reported-by: Ian Stokes <ian.stokes@intel.com>
Fixes: 78bd47cf44a5 ("netdev-dpdk: Use RCU for egress QoS.")
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Tested-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/netdev-dpdk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 7c1523e80..49750c3e1 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -2803,7 +2803,7 @@ netdev_dpdk_set_qos(struct netdev *netdev, const char *type, if (type && type[0]) { error = EOPNOTSUPP; } - } else if (qos_conf->ops == new_ops + } else if (qos_conf && qos_conf->ops == new_ops && qos_conf->ops->qos_is_equal(qos_conf, details)) { new_qos_conf = qos_conf; } else { |