From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] log: Properly reset log_history_size in rte_log_dump_history() Date: Mon, 22 Jun 2015 18:54:09 +0200 Message-ID: <1809202.Avhj2kXmbc@xps13> References: <1432895688-1728-1-git-send-email-jblunck@infradead.org> <1433151038-630-1-git-send-email-jblunck@infradead.org> <556C29DF.2050602@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Jan Blunck Return-path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id 8002EC390 for ; Mon, 22 Jun 2015 18:55:11 +0200 (CEST) Received: by wibdq8 with SMTP id dq8so81383515wib.1 for ; Mon, 22 Jun 2015 09:55:11 -0700 (PDT) In-Reply-To: <556C29DF.2050602@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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@entry=0x7f02035cd000 "DATAPLANE: 9:dp0s7 link RTM_NEWLINK [dp0s7] \nCAST,LOWER_UP>\n", size=size@entry=86) > > at /usr/src/packages/BUILD/lib/librte_eal/common/eal_common_log.c:122 > > > > Signed-off-by: Jan Blunck > > Acked-by: Olivier Matz 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 ;)