[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190904120324.72ed8e70@hermes.lan>
Date: Wed, 4 Sep 2019 12:03:24 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Andrea Claudi <aclaudi@...hat.com>
Cc: netdev@...r.kernel.org, dsahern@...nel.org
Subject: Re: [PATCH iproute2] devlink: fix segfault on health command
On Wed, 4 Sep 2019 19:26:14 +0200
Andrea Claudi <aclaudi@...hat.com> wrote:
> devlink segfaults when using grace_period without reporter
>
> $ devlink health set pci/0000:00:09.0 grace_period 3500
> Segmentation fault
>
> devlink is instead supposed to gracefully fail printing a warning
> message
>
> $ devlink health set pci/0000:00:09.0 grace_period 3500
> Reporter's name is expected.
>
> This happens because DL_OPT_HEALTH_REPORTER_NAME and
> DL_OPT_HEALTH_REPORTER_GRACEFUL_PERIOD are both defined as BIT(27).
> When dl_opts_put() parse options and grace_period is set, it erroneously
> tries to set reporter name to null.
>
> This is fixed simply shifting by 1 bit enumeration starting with
> DL_OPT_HEALTH_REPORTER_GRACEFUL_PERIOD.
>
> Fixes: b18d89195b16 ("devlink: Add devlink health set command")
> Signed-off-by: Andrea Claudi <aclaudi@...hat.com>
Thanks, applied
Powered by blists - more mailing lists