From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1B3AA00C5; Tue, 15 Feb 2022 16:27:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41B36410F7; Tue, 15 Feb 2022 16:27:30 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id AB785410F3 for ; Tue, 15 Feb 2022 16:27:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644938848; 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=zuMwPEoe72XgS/eFKfK13VeIsq2ELf3XVxtm/JIA1Bs=; b=FFoba6l5A2rXpwHomFyEznmkzLu86fxn1o/fJvPNGjZ1N20bB+xQ0QGBj+CIaHycZVyOks CnNmx3sqEyPi1sxfFynG5akx61KqX3mKOUZAd7YUjGckr/vpKtBB4KOyo/QJssJXf1hWM/ nmWPmrcTwAYjc2AIXLjU+P3yBER3f6Q= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-111-ysTDIhkRPGmHlNnqe0SHgA-1; Tue, 15 Feb 2022 10:27:27 -0500 X-MC-Unique: ysTDIhkRPGmHlNnqe0SHgA-1 Received: by mail-lj1-f197.google.com with SMTP id p9-20020a2ea409000000b0023ced6b0f51so7337907ljn.19 for ; Tue, 15 Feb 2022 07:27:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zuMwPEoe72XgS/eFKfK13VeIsq2ELf3XVxtm/JIA1Bs=; b=HmSnrtlvtCi4M0h5p/JdqWltSzeb7yQIyr3OJcrt8tIpUZAPj1yNsuCZBOPNcKYeD9 oS/2gK83vd4VNPuGI0BSh/LrJNClWVfSZ5TRZLq0FC7KAGhk80BcQj06osVaOEf1Agqc mYmqCN6VXWK+M8odEc9vEaLUgbv5Yp8gt0ee9Mag+TD6zcHeG/jjSgczEUBTV5mPFiXC 97LySv/ED9GKGogTMIdyxK+gbqQIFq5d2xo1edV7FKbmxHogh9EPKXnHoJifpPVlfvtA M0SRgRK0v/0z0FJHjBkkhT2TwrewechB4dqkJfRbmncMzeJtBtqyuXbReK5Nx+iCtHp9 hqoQ== X-Gm-Message-State: AOAM530H2RXPeDI5hs2Eyx5HUADEudxrWmzzgltlpnhX+pxnujkEIeJ4 SXqJ6qWq9x9jjfP4UmzVdde1hmQTozjfBhlVdDTTEEoq/eLLfdCEHuDFe/sjzokit+AiJ4zNMCv C4/zGrp9ojEbgrlktj3A= X-Received: by 2002:ac2:4951:: with SMTP id o17mr3353646lfi.553.1644938845454; Tue, 15 Feb 2022 07:27:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm3uxVPkZKvm4TACZvBXGjWomlCS9OOnPikSgvKovjszzUMN9tZ/iLkBitv5YLMvbzGFHY3NgshDQXRRbjjPQ= X-Received: by 2002:ac2:4951:: with SMTP id o17mr3353638lfi.553.1644938845260; Tue, 15 Feb 2022 07:27:25 -0800 (PST) MIME-Version: 1.0 References: <20220210071052.527-1-madhuker.mythri@oracle.com> <20220210170131.2199922-1-grive@u256.net> In-Reply-To: <20220210170131.2199922-1-grive@u256.net> From: David Marchand Date: Tue, 15 Feb 2022 16:27:13 +0100 Message-ID: Subject: Re: [PATCH] devargs: Fix rte_devargs_parse uninitialized calls To: Gaetan Rivet Cc: dev , madhuker.mythri@oracle.com, "Yigit, Ferruh" 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" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Feb 10, 2022 at 6:01 PM Gaetan Rivet wrote: > > The function rte_devargs_parse() previously was safe to call with > non-initialized devargs structure as parameter. > > When adding the support for the global device syntax, > this assumption was broken. Restore it by forcing memset as part of > the call itself. > > Bugzilla Id: 933 Nit: Bugzilla ID* > Fixes: b344eb5d941a ("devargs: parse global device syntax") We need a backport in 21.11, right? > Signed-off-by: Gaetan Rivet > --- > lib/eal/common/eal_common_devargs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c > index 8c7650cf6c..184fe676aa 100644 > --- a/lib/eal/common/eal_common_devargs.c > +++ b/lib/eal/common/eal_common_devargs.c > @@ -191,6 +191,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev) > > if (da == NULL) > return -EINVAL; > + memset(da, 0, sizeof(*da)); > > /* First parse according global device syntax. */ > if (rte_devargs_layers_parse(da, dev) == 0) { > -- > 2.31.1 > Otherwise lgtm. -- David Marchand