[dpdk-dev] [PATCH v2] log: Properly reset log_history_size in rte_log_dump_history()
Thomas Monjalon
thomas.monjalon at 6wind.com
Mon Jun 22 18:54:09 CEST 2015
2015-06-01 11:46, Olivier MATZ:
> On 06/01/2015 11:30 AM, Jan Blunck wrote:
> > In rte_log_dump_history() the log_history list is reinitialized without
> > resetting the log_history_size. In the next call to rte_log_add_in_history()
> > the log_history_size > RTE_LOG_HISTORY and the code unconditionally tries
> > to remove the first entry:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > rte_log_add_in_history (
> > buf=buf at entry=0x7f02035cd000 "DATAPLANE: 9:dp0s7 link RTM_NEWLINK [dp0s7] <UP,BROADCAST,RUNNING,MULTICAST,LOWER_UP>\nCAST,LOWER_UP>\n", size=size at entry=86)
> > at /usr/src/packages/BUILD/lib/librte_eal/common/eal_common_log.c:122
> >
> > Signed-off-by: Jan Blunck <jblunck at infradead.org>
>
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>
Applied, thanks
Note: this is a good example of patch title renaming.
As it is a fix, it should start with "fix".
And in general, function name is not a good candidate for a short title.
It becomes:
log: fix crash after dump
shorter and clearer ;)
More information about the dev
mailing list