From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0071.outbound.protection.outlook.com [104.47.34.71]) by dpdk.org (Postfix) with ESMTP id 757BCFFA for ; Tue, 12 Sep 2017 17:06:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MY3l8L9T09P1x51kK53c1ycfnsLczJjLmdYm8DThCdQ=; b=m0mjtyZ+H8pngv/8PlI3QiyBv+SctDgj2uC5/aNrbdGgu/j81SXPB0rUcQXW1Buw5d75mTguDZpEN3qDuSH6nhm0bkKv3J/jeK2AdH6ywCJscNkv1mr64rRYpqevikucNG/JrR/V17+Irhl+NAdJXYSo4lokVv33P5hn0EBrW/c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Tue, 12 Sep 2017 15:06:52 +0000 From: Pavan Nikhilesh To: reshma.pattan@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 12 Sep 2017 20:36:03 +0530 Message-Id: <1505228764-9738-1-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0106.INDPRD01.PROD.OUTLOOK.COM (10.174.144.22) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 282b3208-a0f9-4106-a7c4-08d4f9efe6ff X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:iCXQAQmSH6P7IDXg4jlAOxd3l7GKKTDbSS+f9KW1E0LmR9TLY68tArlc2L39POmRSuDu9jXCv9ZXc9gDT6HwqVpx8cRmbxO+i8OL7tC2mIlMEnujkbt06/nVvdgXrSW1/Gr7D+6KCfQBK4eUYfMR1dNNXBhGivPOzfc6gwCS0dCGQPy0QJiJ/S/f5/L58RjikmeS+J4t7Ew2BNK7Bqlz1+7bHMbi1bvD7CyaQqvZ2Khcn7LDKZpRYOqXxll0FVqT; 25:rQqcdSqATbZvA0Ne2lZ2k8aKXj8/BZvaRTmyKbtRh6VBLj4UcnN22Gpz4Fd/9LbdKVgdiLNf0YCvrl0yjNrhZltetbpLoJPSPDS6GKxAVONpnkMZp20EPBEzfkAZdSeaeSC0J7qtqVrIQ5PYDnD1bhlGi7k86WMNYJh+9jPp5pFbu+/xEkKEfgcTk5+/fYe9MBInA4G+RUsvTKgasTMkCkFBCX4kQPDJZCa0kDyAlFUPGfcHvFA083nwJ7ir9dDhC2wknFk2SfnbG7N9G19EUb7l9DlOy5U30P4otL16cFCOEInp6wFt/7Q80b5wIsMug3W/P79B1mESVPsfUfuCuw==; 31:4CElrcbq2lsMukYIJaFHsY+ism1JaWTyxZRDljRaocoG23ea4p83xnD83tXP5mYjutHu1qCdn5IDgCDMYUkaWgAPU6ioHg0eO+IbtSYa6/rAY0S1W0WWAXoiYUIfobIZuj+jtcvVqm8eHd71V+k1VuV3ugzJwPBt2GpQAbG1L8Vb3U/VmkH+PucR5dbc2hpNJtRuQ/6I9rfhFHrKXoowQjzBZp7a+ljNcw1bcZZ8OLo= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:qSRqobrcz6UW6Q2yjRMXq6PZjIHOcWeBz5B1yAbECjIfyjosZz15vyTlhwyA32SYym8s76AaW6L1nl9RMHhOXq0AM31JHVoKN8t5zo1OFtfRHwuCZjQqAN/RcC6ic89SzMmp0HUKQ5TIFECCcdYvE3xFxsbsl0aHKsqNLBBz3+g5oRI++6WYlSlSSeaDcIweaHutBcSfXi84a0O/k/7+E9FJ41Xx/SSpOrnv9UdFdp5zTHcRlFoLleE5xjUXiPWTjUsDlI1R8rFyB54wCvwG7SK/5i4AOcmu2ftPz0XTnRa9/H2JlpAL7UM2nq0uWKmLrxOk7IaanmOr0DU2ojBsGH3N04d+RzYKDZo+FzoBjfJwh+vpjpEEgCMY7yxShHq8IAhTqSETgXLxeMbCfJMB54Qh+Rra51VNmQcLXlkQVKF3+RZa3sxyksMaZZdF0+U6tyNujGEXi0LxKW5pJBzs+x3pehxKAC3+ERa4vgcpJIUkVg64XcKc9wG8bnXw3fqXPk2iMd3kYVvs6DDvXA9w70tCmoRBSR3fbdFuiEAWArrnZvrAyOlKTHRebGP98fdfU5Rp4gghl2vo05QeAfbOszYWFr+49xtkRN5EHRrOD7c=; 4:oqMDEsiD0i9ABVGycErLoM2DwPvBLFSc8Pmwra+A+2HZsOvXv74oIMPMTwElyO+FnZyY/Acm7sqOdxQQ6v30DljEJK0KBfIyIThjPqlGlkQlqp1ku1OhU5YqwEeu8BvBaclkbfTKQnjGfRUaVBwKjmLoPhSuQLm1OK+kD+6g48k1pjeoHvQcXyRMppYS2kWmIvn4uwkGZjR/n4CqZNNXAiS/TBkBh1rAooI+6oMYOM50pMvWY+PRtC3BbviuZbYl X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 042857DBB5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(47776003)(6916009)(2361001)(6666003)(33646002)(2351001)(42882006)(5003940100001)(2906002)(4326008)(50226002)(66066001)(48376002)(68736007)(25786009)(50466002)(53936002)(53416004)(36756003)(105586002)(305945005)(6512007)(106356001)(7736002)(107886003)(110136004)(42186005)(189998001)(8676002)(81166006)(8936002)(81156014)(6486002)(6506006)(5660300001)(50986999)(6116002)(72206003)(316002)(97736004)(3846002)(69596002)(101416001)(478600001)(5009440100003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3464; 23:MBO8H2HIC/34AI8SWv6KcMj05uS/QJNL2F3z8PiIO?= =?us-ascii?Q?A/scQ6ZOOONvTrzvVa/1zz01rcCJmCA2B3ceW5bcHWPC15TtbVyECvJjbfBG?= =?us-ascii?Q?r5Vcf73AHWPcD9w5gxL7O/x9dJwJoIHcvxmLXuGQAVTeE6Nq4VAbLQsrjqSf?= =?us-ascii?Q?LpD6W1uZsD1hma2I1Y/wLqBoSu6CxBFiKF4z+ut/BKlbG7DPfi9Eow/1zJCg?= =?us-ascii?Q?jtsSkX0hsnW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Y?= =?us-ascii?Q?HRwIFiBhyO6DU0A1+W3qGC9Qn+YNJDbxlGhGfo5K1qAf4EDDpdEQA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 6:9SOVFYXdXCyyRxjBmASq3Qxak1VTBbTq6s8Pbl3R98fz3RQEYlITl6NuZUqSeIrcYv5taiAFh5nPmBugUnHxrfuyKx1FkLwhH9+4U8EUQuI2YjUjFRrGeCz3Sd3uuYw8djGkkGizGpd/OxhHmzTgQlRec0dF1Tv6VF97V2FxyS/0F8tM9Wqw2ROVj4c/E4Ttvz2Q0O6xhei/sdyxOu3BD367rbRKVU4er/b8wY7ndxbN/Z/muidQRCIZ7SAw/MiUDMB7i6dMSvQtBliecThZQB9Hsa+cmdLmEvNs+gGOcHuXWOShhigMdHROdklA4Jo6Gr3mtTmaUpr6pt3G2lFBUQ==; 5:IyBEnX/5QIiNCUv3aL99g8WUISYW09cGXTAZAzQiW3yPEbBw1RviZUatr5Oac6ZFD5m2dIZP5KT+53WzfsBR+WB7fLpijy1dp2F+517+JgHzexAOtMVKlMfRZ5oFTHmiqaHaWcO/5z76FacvNvOWbw==; 24:Q5C1YcIff2Svsxq5HVS+akz8iruFR6MUWFREfIMrvKQ4Asmbk4xZysuPq3DHpTvfK0Tx9qbVi/tv2pxLXVjAaTRkXhD1PJEfciQdfZAeIbI=; 7:MnVGNnZRSGdYvUgk2ePLe2OMCATrNvQkspGoaDwv0Pu9nxIGGY788vipvUu6GpmO3nHJFrKWJB2DX9jhqsx5+VypCv0/2fwIOAaXUBsWc9FACDcIJjLeEusGK8ecwRwbKjykC2WY3VSiz69hYV3U04C2nzxkhegDmT36beGV4Sgxf4waqalIWXqGHGLDjr1F0lEAYYQcSEyrGjsRHOtcVt6vql4ZKwBi0KnhijETCS8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2017 15:06:52.0034 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out 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: , X-List-Received-Date: Tue, 12 Sep 2017 15:06:57 -0000 The ready buffers should be set to NULL when drained else it might result in double free (mempool put) when rte_reorder_free is called. Fixes: b70b56032bff ("reorder: new library") Signed-off-by: Pavan Nikhilesh --- lib/librte_reorder/rte_reorder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_reorder/rte_reorder.c b/lib/librte_reorder/rte_reorder.c index 010dff6..302eba6 100644 --- a/lib/librte_reorder/rte_reorder.c +++ b/lib/librte_reorder/rte_reorder.c @@ -392,6 +392,7 @@ rte_reorder_drain(struct rte_reorder_buffer *b, struct rte_mbuf **mbufs, /* Try to fetch requested number of mbufs from ready buffer */ while ((drain_cnt < max_mbufs) && (ready_buf->tail != ready_buf->head)) { mbufs[drain_cnt++] = ready_buf->entries[ready_buf->tail]; + ready_buf->entries[ready_buf->tail] = NULL; ready_buf->tail = (ready_buf->tail + 1) & ready_buf->mask; } -- 2.7.4