From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0ECBBA04E0; Fri, 29 Nov 2019 09:25:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4EE669E4; Fri, 29 Nov 2019 09:25:31 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id C4DC691 for ; Fri, 29 Nov 2019 09:25:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575015929; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iPXNTfJMScf9izOJwmKRobptE+TsCmMSTi/C9CSNZKU=; b=HBEiFJQeDkv1ZelhW1NLIsunKvPumu3wEBWaD0fOOrtJEPBCjHvrg49NkrOjotXYgJUfHv aNnFxKHsEWzh3ZhKu435IjVQwAizFIGMaJLX8w3ZfeK/A80GLRKT+oVyBSC45LW0ONkWkV 2kP8gYE9SCnK2ujiDjp7gMIeVe3SVds= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-130-3augHEgNNpm6IRWSVl_Ddg-1; Fri, 29 Nov 2019 03:25:27 -0500 Received: by mail-vk1-f199.google.com with SMTP id k16so1357813vko.11 for ; Fri, 29 Nov 2019 00:25:27 -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=yRD0nabjtQMfbYxIcrmHPy60cvbljPOSRxHHdETHNYQ=; b=WT9ADuAo8tVV7YCYoMS3s+P6xHV4haVgV03UygMfRb/EIWsHsHD7ISfOTTsXFI2P16 uYSQ+Hsc0F5fHrpRNFRK/WDIxRnNGiwLR8N2T4bTc6OGnJwCdcltzQQoQ2pGJWMZ0FH2 6I0ZFqe+FlmDhuNSXuHAzvc+pDdLYhQWBjuA6PFuzO1mFQyyIPY1B/r7tKotYxcD8wMH Ka7s1NnPM7Cn6XNAakM5jaIn1ksMHoBa6tYc9chcoUeJd8YcQZXRUKcGgUp/EZpIva54 yOgPdP0sl++veqnn0cSiDVgZFJymLzvyZ7AfbQ9uaG43xUXMilaF3p9YIDEJuIVghZ8c lWmQ== X-Gm-Message-State: APjAAAVgYyM8AvY/qfSKA4lu0JE0lZeHArG60twZSN7DLymTd0oMsUkC fTIso0OPKrE3ayAeBchnmFIt8UO3sXtCNdFrBW8bH023bFE1yZlWbRQ/blmz8ptTuzz7ggxXIGR IzMhH+c/TN5pkXJn2H0s= X-Received: by 2002:a67:ee49:: with SMTP id g9mr32013527vsp.105.1575015927339; Fri, 29 Nov 2019 00:25:27 -0800 (PST) X-Google-Smtp-Source: APXvYqw5flPuN7X/k1VCQ9Yf++OC3M5o4SocrjR7ugvAEJMOBHkGul/Br8tKMiHERKgpN2lKAZJ/tzqnRog8jgov8as= X-Received: by 2002:a67:ee49:: with SMTP id g9mr32013515vsp.105.1575015926812; Fri, 29 Nov 2019 00:25:26 -0800 (PST) MIME-Version: 1.0 References: <20191127223232.26404-1-stephen@networkplumber.org> In-Reply-To: <20191127223232.26404-1-stephen@networkplumber.org> From: David Marchand Date: Fri, 29 Nov 2019 09:25:15 +0100 Message-ID: To: Stephen Hemminger Cc: dev , dpdk stable X-MC-Unique: 3augHEgNNpm6IRWSVl_Ddg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] eal: fix unitialized data warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Nov 27, 2019 at 11:32 PM Stephen Hemminger wrote: > > Valgrind reports that eal interrupt thread is calling epoll_ctl > with uninitialized data. Trivial to fix by initializing it. > > Fixes: af75078fece3 ("first public release") > Cc: stable@dpdk.org > Signed-off-by: Stephen Hemminger > --- > lib/librte_eal/linux/eal/eal_interrupts.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/l= inux/eal/eal_interrupts.c > index 1955324d3045..2cd537ba4492 100644 > --- a/lib/librte_eal/linux/eal/eal_interrupts.c > +++ b/lib/librte_eal/linux/eal/eal_interrupts.c > @@ -1045,7 +1045,7 @@ eal_intr_handle_interrupts(int pfd, unsigned totalf= ds) > static __attribute__((noreturn)) void * > eal_intr_thread_main(__rte_unused void *arg) > { > - struct epoll_event ev; > + struct epoll_event ev =3D { }; > > /* host thread, never break out */ > for (;;) { typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ } __EPOLL_PACKED; static __attribute__((noreturn)) void * eal_intr_thread_main(__rte_unused void *arg) { struct epoll_event ev; [...] ev.events =3D EPOLLIN | EPOLLPRI | EPOLLRDHUP | EPO= LLHUP; ev.data.fd =3D src->intr_handle.fd; [...] if (epoll_ctl(pfd, EPOLL_CTL_ADD, src->intr_handle.fd, &ev) < 0){ So the uninitialised part is because we only set an int in the union. False positive from valgrind, but the fix is quite simple. Acked-by: David Marchand --=20 David Marchand