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 D8D43A0547 for ; Mon, 20 Jun 2022 20:41:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBE7E427F4; Mon, 20 Jun 2022 20:41:26 +0200 (CEST) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by mails.dpdk.org (Postfix) with ESMTP id 4010440151; Mon, 20 Jun 2022 20:41:25 +0200 (CEST) Received: by mail-qv1-f47.google.com with SMTP id g18so9600090qvn.2; Mon, 20 Jun 2022 11:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Iz9FaD3tA7kSJJI8Qv6IcM+ykp4NXfmIbuosCkIVcOM=; b=pi+V0oLzgEHSnoDvfCuj+U+MYRjhchtIGzMzt6m+0Ib1eOOZPcD5w/ZUYjbHCe30bN gBvoTwfYeBhIWlSP3Hi0lzYD5wrv/invpO6Byx40G8oomorHlVZqt0LFsTcaaULIB+RC nh5lFp8OJEayUsiKDR6KB7DQelwm9/3qzW6LxSJ7ORTyxSwojKuKzy4TeJWlVTSlDGG+ +nlx9DCKVMzXohZuRnP6E15J3zFA2UWNSoFQBlK7Teo3FyoIJymo6tbXA/e3gsYH2yxL 1dXpLOoIRVHP0jBw2CKep1X4zAEn372ugNQo4UL0FGHwryeULOwiMLXQ8UuAeY24zANu 9JRw== 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=Iz9FaD3tA7kSJJI8Qv6IcM+ykp4NXfmIbuosCkIVcOM=; b=wM+FyfSsidrlUg3rW8CGuaWEeV+OakHdTZLpC8esc0lRsaWiH9pw9N+zLdVDziw379 33m4pjvgnfiNJhF1opBJM2dFehgP+ijhs1iQBk2vYgdntunodMK/D8DQLdG2UAOEvBx7 4pbUhPb6zGPxDK9O8lWTCRep81YvMM6umFDs78U8QBf1vK2q7TC82F+cQGTPj8WqSWRU JRcPuwPczG1SE+Ibm3izBWNHxbzAYW9sol/d7lhumvw2oxTU5gUoyZWnPlYdDVkJBvir iWerRUS4MygmUoU8iIjT/qIMZGgkKxp9wSGKrBRHv6Ru0celFh12VjcmPoMZVUCgN77e VEiA== X-Gm-Message-State: AJIora9qNEIO1drVUmf7NEzjj4CkUWF6wACnyV2hcvHQj6lvtutEIHCA wUA4MTJ8BjG23iiZIbo1WjpYAkuxsThh2/z/IwRdwGs/HeY= X-Google-Smtp-Source: AGRyM1sD7IqsHcstS+AZeH3WuQIJ45/wUiNFaJnwHmb9nk0kOCEUjtUV4EeTRLQT22ReWGgZZ39p3hD+UUkUf2SQchE= X-Received: by 2002:ad4:594d:0:b0:46b:afcf:fb67 with SMTP id eo13-20020ad4594d000000b0046bafcffb67mr19886528qvb.11.1655750484691; Mon, 20 Jun 2022 11:41:24 -0700 (PDT) MIME-Version: 1.0 References: <20220616050441.2197264-1-s.v.naga.harish.k@intel.com> <20220616051458.2197410-1-s.v.naga.harish.k@intel.com> In-Reply-To: From: Jerin Jacob Date: Tue, 21 Jun 2022 00:10:58 +0530 Message-ID: Subject: Re: [PATCH v2] eventdev/eth_tx: fix adapter create To: "Jayatheerthan, Jay" Cc: "Naga Harish K, S V" , "jerinj@marvell.com" , "dev@dpdk.org" , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" 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 On Thu, Jun 16, 2022 at 11:28 AM Jayatheerthan, Jay wrote: > > Looks good. > > Acked-by: Jay Jayatheerthan Applied to dpdk-next-net-eventdev/for-main. Thanks > > -Jay > > > > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Thursday, June 16, 2022 10:45 AM > > To: Naga Harish K, S V ; Jayatheerthan, Jay ; jerinj@marvell.com > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: [PATCH v2] eventdev/eth_tx: fix adapter create > > > > During adapter create, memory is allocated for storing event port > > configuration which is freed during adapter free. The following > > error is seen during free "EAL: Error: Invalid memory" > > > > The service data pointer storage for txa_service_data_array is > > allocated during adapter create with incorrect size which is less > > than the required size. > > Initialization of this memory causes buffer overflow and result in > > metadata overwrite of event port config memory allocated above > > and results in the above error message during free. > > > > Allocating the correct size of memory for txa_service_data_array > > prevents overwriting other memory areas like event port config > > memory. > > > > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > > Cc: stable@dpdk.org > > > > Signed-off-by: Naga Harish K S V > > --- > > v2: > > * fix commit message > > --- > > lib/eventdev/rte_event_eth_tx_adapter.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c > > index 1b304f0a73..c700fb7b1f 100644 > > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > > @@ -224,7 +224,7 @@ txa_service_data_init(void) > > if (txa_service_data_array == NULL) { > > txa_service_data_array = > > txa_memzone_array_get("txa_service_data_array", > > - sizeof(int), > > + sizeof(*txa_service_data_array), > > RTE_EVENT_ETH_TX_ADAPTER_MAX_INSTANCE); > > if (txa_service_data_array == NULL) > > return -ENOMEM; > > -- > > 2.25.1 >