From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 374B9A09FF for ; Wed, 6 Jan 2021 10:35:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2934E1608E1; Wed, 6 Jan 2021 10:35:28 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 4C62C1608F1 for ; Wed, 6 Jan 2021 10:35:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609925726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=K9kGMiLwWZq27QOG2NxzppsdukT8YUJN6e+doTm3x7o=; b=OoY2EPKL9SnUxwNiPIQ+ZBGmcC6Cyv8t+1wCnsJVoUbgFHBZVSKp88INE/L/qn3x4GXoG5 mzeaeZxh/Vroy+pk7EpudmYqBq8GHHBZfZXsCOgVa2aWL3nFqhT+200jYP1HrxvpZkhPpd 0N40llw6r4FU+jBKEmA/Rh+MsThLH/0= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-AWXkRCTbN2u2La2B7sIhRg-1; Wed, 06 Jan 2021 04:35:25 -0500 X-MC-Unique: AWXkRCTbN2u2La2B7sIhRg-1 Received: by mail-vk1-f200.google.com with SMTP id a204so1183440vka.21 for ; Wed, 06 Jan 2021 01:35:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K9kGMiLwWZq27QOG2NxzppsdukT8YUJN6e+doTm3x7o=; b=jtksg75HlTNKHW4ptRk2inNB7JNQy+qOUPzSX8yC1yxcj/5m8ci20GAMj/51DQP44f BSnJBJWvNbZYaJu7N73k00sOAMjCSXlY+cy/FO39ymyrjlioaFPMczuI6CW+HPw0jf0Z 5gEhjW7B7WDErm7JZwgYuVi3H1F7Qr4oLpFPa3pgKFf2Vzc2PV7CSLzZOcgnGvQtNASJ mi67jLFpxE9Q4N+s7iO70xXT+tS0TbNNGTcdUexlEceIFdCWKaMtQjd7aLQwBEYMAGrI A73d2TVE9oz11DHXdCp87PL3+12iA7OJPJKPyIF49DNfx7jtvORkAFrBSS0Lo0Z8WSzv 2biw== X-Gm-Message-State: AOAM530PeMUVpplB4DOjWXiIhpuCFAlDyxXh33NMHtIdJznpJt2IDfUy Iy8rrxwJhW0vukgisrWg71bKs9tGYLQ4wwIWf5JtEwZADBwIotdoiSh26VUlXs4Vu+fCscnOt4v JTSb0X0Yt+MPOhHHf9EhiMhU= X-Received: by 2002:ab0:44c6:: with SMTP id n64mr2675224uan.53.1609925724718; Wed, 06 Jan 2021 01:35:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJznC+FgE87c/wFdspsaeUu0EroaCPQr3GMVpb7dyGlIv1lkW+9xG03fs3Ysj8u/omyNVVQKJWpQ1d4HU1tV9H0= X-Received: by 2002:ab0:44c6:: with SMTP id n64mr2675217uan.53.1609925724531; Wed, 06 Jan 2021 01:35:24 -0800 (PST) MIME-Version: 1.0 References: <20201211170615.32827-1-aboyer@pensando.io> In-Reply-To: <20201211170615.32827-1-aboyer@pensando.io> From: David Marchand Date: Wed, 6 Jan 2021 10:35:13 +0100 Message-ID: To: Andrew Boyer , "Burakov, Anatoly" Cc: dev , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] eal: don't log uninitialized string X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Fri, Dec 11, 2020 at 6:07 PM Andrew Boyer wrote: > > Our Coverity scan pointed out that path[] is never initialized. > The official DPDK Coverity has not reported this so there is > no public CID for it. > > Fixes: c44d09811b40 ("eal: add shared indexed file-backed array") > Cc: anatoly.burakov@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Andrew Boyer > --- > lib/librte_eal/common/eal_common_fbarray.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c > index 1220e2bae..6ce89af83 100644 > --- a/lib/librte_eal/common/eal_common_fbarray.c > +++ b/lib/librte_eal/common/eal_common_fbarray.c > @@ -83,11 +83,10 @@ get_used_mask(void *data, unsigned int elt_sz, unsigned int len) > static int > resize_and_map(int fd, void *addr, size_t len) > { > - char path[PATH_MAX]; > void *map_addr; > > if (eal_file_truncate(fd, len)) { > - RTE_LOG(ERR, EAL, "Cannot truncate %s\n", path); > + RTE_LOG(ERR, EAL, "Cannot truncate fd %d\n", fd); Logging a fd number won't help much, but I guess this was not really helpful with path[] either :-). If we keep this log, I would move it to the callers of the functions, where the filename is available. -- David Marchand