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 EFF2741DD0; Sun, 12 Mar 2023 15:34:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDB9440F18; Sun, 12 Mar 2023 15:34:38 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 64F67406A2 for ; Sun, 12 Mar 2023 15:34:37 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 2F27932003CE; Sun, 12 Mar 2023 10:34:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 12 Mar 2023 10:34:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1678631675; x=1678718075; bh=ceoBvwjvaU7X1aXLh1hz2b10JH0CANR2Qt+ ddP7otmU=; b=N4lxbk0+y5fOXmqgVR22x0sIjMAJBdWAmc1zZvwFK9/S0hD0vuI o+1rtWtgi/Z4dSJVWErfat8ncdV+O9Ao8no0stle7P//bSOTMgmh+gswYc+dBqDt NnJuT2B3jwnPNd2s5yiG6YaPHT4oymbtz0Cv+4rRzjbkriBOTCna6ebPLUAflRs4 mJB75cZ4MfEOVywi2Z5trJOzPqvqxvg1IOgYxJuOGwrNguPPhMYEUWk0hfbUVpnQ EJbjsVgJsleIKlDvcQZOow618hm8RR+hMZp4l5n8zejIBXCsiYWhZ9SQ7CPlTqZL oSihytiikLFysJ5iyWJMiGFnE6BWWGgtwnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1678631675; x=1678718075; bh=ceoBvwjvaU7X1aXLh1hz2b10JH0CANR2Qt+ ddP7otmU=; b=WjfHAXYFES3OENYdhlHKPjDmGWxNqz1eH0e8+EqT/1aynRyOYxH tO8cQW1EXhOp3MHBAdvW7ebXqt3moGcc836N95I+7ZCNtoqrYd15MvulAsxR0GFD Pi5KUQakUDFicvwEDHcldaFCAdi7szdO8vPhPvw42Q7VShmboV7/e16ONRmcZ/h+ SEKaWtJA3BEue6r6JaqirCnkNRtrQYFexRRyQ/gX+0Udlulc0K7IHV6qO8D0rMni NVlT/gTkllNu1IdKFMfLB9jTtmWk2izdCu4rxkeDSUFyPQdjuXkE8lniFgJdXHzi hlkGVlHXrtU9lbHpjc+za99bkmKGh8XYW/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvvddgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 12 Mar 2023 10:34:34 -0400 (EDT) From: Thomas Monjalon To: "Richardson, Bruce" Cc: "dev@dpdk.org" , "Ajmera, Megha" , "Dumitrescu, Cristian" Subject: Re: [PATCH] examples/qos_sched: fix buffer overflow on mbuf free Date: Sun, 12 Mar 2023 15:34:33 +0100 Message-ID: <2313696.BjyWNHgNrj@thomas> In-Reply-To: References: <20230308140902.269982-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 > > When running the qos_sched app with separated worker and Tx threads, the > > app would seg-fault after a short time of handling packets. The root > > cause of this turns out to be an incorrect array index when freeing > > unsent packets post-Tx. Rather than freeing packets using the "nb_tx" > > value i.e. where transmission failed, the function was freeing packets > > using the "nb_pkts" value, i.e. going beyond the number of packets > > previously received into the buffer. > > > > Fixes: 39b25117c40b ("examples/qos_sched: remove Tx buffering") > > > > Reported-by: Megha Ajmera > > Signed-off-by: Bruce Richardson > > Acked-by: Cristian Dumitrescu Applied, thanks.