[ovs-dev] [PATCH ovn] ovn-nbctl: Fix using uninitialized direction while removing qos.
Numan Siddique
numans at ovn.org
Thu May 14 07:06:38 UTC 2020
On Thu, May 14, 2020 at 1:36 AM Mark Michelson <mmichels at redhat.com> wrote:
> Acked-by: Mark Michelson <mmichels at redhat.com>
>
>
Thanks Ilya and Mark. I applied this patch to master.
Numan
> On 5/13/20 1:12 PM, Ilya Maximets wrote:
> > GCC 9 complains:
> > utilities/ovn-nbctl.c: In function 'nbctl_qos_del':
> > utilities/ovn-nbctl.c:2592:15: error: 'direction' may be used
> uninitialized in
> > this function
> [-Werror=maybe-uninitialized]
> > 2592 | !strcmp(direction, qos->direction)) {
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > If uuid specified along with extra arguments like priority or match,
> > code might use uninitialized direction for comparison and probably will
> > crash. Exit early with error since we're not supporting such command
> > lines.
> >
> > CC: Tao YunXiang <taoyunxiang at cmss.chinamobile.com>
> > Fixes: 3aca9a51c276 ("ovn-nbctl.c: Add an optional way to delete QoS by
> uuid")
> > Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> > ---
> > utilities/ovn-nbctl.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
> > index 67b23108f..f4da7c8ed 100644
> > --- a/utilities/ovn-nbctl.c
> > +++ b/utilities/ovn-nbctl.c
> > @@ -2572,6 +2572,11 @@ nbctl_qos_del(struct ctl_context *ctx)
> > return;
> > }
> >
> > + if (qos_rule_uuid) {
> > + ctl_error(ctx, "uuid must be the only argument");
> > + return;
> > + }
> > +
> > int64_t priority;
> > error = parse_priority(ctx->argv[3], &priority);
> > if (error) {
> >
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
More information about the dev
mailing list