Skip to content

Commit

Permalink
netdev-dpdk: Fix crash in QoS.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 78bd47c ("netdev-dpdk: Use RCU for egress QoS.")
Signed-off-by: Daniele Di Proietto <[email protected]>
Tested-by: Ian Stokes <[email protected]>
Acked-by: Ian Stokes <[email protected]>
  • Loading branch information
ddiproietto committed Nov 15, 2016
1 parent 63906f1 commit 44975bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 44975bb

Please sign in to comment.