From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatoly Burakov Subject: [PATCH 00/10] Coverity fixes for EAL memory Date: Tue, 17 Apr 2018 16:50:07 +0100 Message-ID: Cc: thomas@monjalon.net To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C4CEBCF9E for ; Tue, 17 Apr 2018 17:50:19 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patchset fixes a host of coverity issues in memory subsystem introduced with recent DPDK memory hotplug patchset. Coverity issues fixed: - 272601 - leaking fd - 272560 - double close fd - 272568 - leaking fd - 272570 - leaking fd - 272589 - dereference before null check - 272602 - freeing wrong pointer - 272608 - expression does nothing - 272577 - negative return not handled - 272578 - negative return not handled - 272584 - use after free Additionally, also replace all instances of snprintf with strlcpy. Anatoly Burakov (10): mem: use strlcpy instead of snprintf mem: fix resource leak mem: fix potential double close mem: fix potential resource leak mem: fix potential resource leak mem: fix comparing pointer to value mem: fix potential bad unmap mem: fix statement having no effect mem: fix negative return value mem: fix possible use-after-free lib/librte_eal/bsdapp/eal/eal_hugepage_info.c | 2 +- lib/librte_eal/common/eal_common_memalloc.c | 5 +++-- lib/librte_eal/common/eal_common_memory.c | 23 +++++++++++++++++------ lib/librte_eal/linuxapp/eal/eal_memalloc.c | 22 ++++++++++++++++------ lib/librte_eal/linuxapp/eal/eal_memory.c | 5 +++-- 5 files changed, 40 insertions(+), 17 deletions(-) -- 2.7.4