[ovs-dev] [PATCH] netdev-dpdk: Fix crash in QoS.

Stokes, Ian ian.stokes at intel.com
Wed Nov 2 17:59:16 UTC 2016


> 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 at intel.com>
> Fixes: 78bd47cf44a5 ("netdev-dpdk: Use RCU for egress QoS.")
> Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
> ---
>  lib/netdev-dpdk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 7c1523e..49750c3
> 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 {
> --
> 2.9.3

Thanks for this Daniele.

Tested-by: Ian Stokes <ian.stokes at intel.com>
Acked-by: Ian Stokes <ian.stokes at intel.com>





More information about the dev mailing list