[dpdk-dev] [PATCH] eal devargs: don't call rte_log when not initialized
Thomas Monjalon
thomas.monjalon at 6wind.com
Mon Jul 20 02:59:11 CEST 2015
> > This problem was discovered when passing invalid PCI id to the
> > blacklist API in devargs.
> >
> > Any failures in rte_devargs_add would cause a core dump because
> > it would call rte_log() before the the EAL log environment was
> > initailized. Rather than try and log just remove the messages
> > and leave it up to the caller to check the return value.
> >
> > Most of the other failure possibilities are when malloc() fails, and if
> > that happens any logging that used malloc() would also fail.
> >
> > This failure was not caught by the standalone tests to devargs
> > because the tests are run after calling rte_eal_init (which is not
> > how devargs is intended to be used).
> >
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
>
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>
Applied, thanks
More information about the dev
mailing list