[ovs-dev] [PATCH 1/3] ovn-controller.c: Fix possible NULL pointer dereference.

Han Zhou hzhou at ovn.org
Wed Jan 22 20:08:31 UTC 2020


On Fri, Jan 17, 2020 at 4:45 AM Numan Siddique <numans at ovn.org> wrote:
>
> On Wed, Jan 15, 2020 at 3:51 AM Han Zhou <hzhou at ovn.org> wrote:
> >
> > Hi Mark,
> >
> > Thanks for the review!
> > In fact, if cfg was NULL, this function would never have a chance to set
> > probe interval, because before setting the interval it would have
already
> > crashed, at this line:
> >     int interval = smap_get_int(&cfg->external_ids,
> >
> > So, the behavior change of this patch is only avoiding the crash.
> >
> > Thanks,
> > Han
> >
> > On Tue, Jan 14, 2020 at 1:24 PM Mark Michelson <mmichels at redhat.com>
wrote:
> > >
> > > Hi Han.
> > >
> > > This patch introduces a small behavior change in the case where cfg is
> > > NULL. In the earlier version, we would always set the probe interval
on
> > > the southbound database. With this version of the patch, we exit early
> > > when cfg is NULL and do not set the probe interval.
> > >
> > > On 1/13/20 5:52 PM, Han Zhou wrote:
> > > > In function update_sb_db(), it tries to access cfg->external_ids
> > > > outside of the "if (cfg)" block. This patch fixes it.
> > > >
> > > > Signed-off-by: Han Zhou <hzhou at ovn.org>
>
> Acked-by: Numan Siddique <numans at ovn.org>
>
> Numan
>
Thanks for the review. I applied this to master.


More information about the dev mailing list