From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal devargs: don't call rte_log when not initialized Date: Mon, 20 Jul 2015 02:59:11 +0200 Message-ID: <1826981.UI2aTg6Y3s@xps13> References: <1431707860-19562-1-git-send-email-stephen@networkplumber.org> <55630D4B.40708@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id A3C85C35C for ; Mon, 20 Jul 2015 03:00:23 +0200 (CEST) Received: by wibud3 with SMTP id ud3so83734340wib.0 for ; Sun, 19 Jul 2015 18:00:23 -0700 (PDT) In-Reply-To: <55630D4B.40708@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" > > 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 > > Acked-by: Olivier Matz Applied, thanks