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 DAB74A00C4; Sun, 13 Feb 2022 12:29:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7810A4067C; Sun, 13 Feb 2022 12:29:42 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 7BF7E4014E for ; Sun, 13 Feb 2022 12:29:40 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 164D9320094D; Sun, 13 Feb 2022 06:29:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 Feb 2022 06:29:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding: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=fm3; bh=nF1njZj72dQx8w /SswHlYTPyN0TxHuT9t3Q3yKEBX6w=; b=RKZzsf9Kv9Zpt6RCqxtrnpV/rEGpy9 RrjMH3MlRMWj4Eie/mtcfciW9uYZWdKI38NMVx+w7/5DIzxxtFkOar9ZTe3JsTW8 MJ1Qo2kmx+jR5zUoZO+SVq9z+Kyc6epvD8b1i67z+OKemK0kZPSkWXJWdvowdCvz zbJMD4bNshUfkbsQBMPYXwNWS0kHX8YU7zZBNBTod/39Y3qXRPF3M1vCkdhBfBh6 N0FIi5l0nZ9AiwrbZDluHAt/yl/o2Ykp3f1X0tGBbAjGRWk1ZNCgwDTkhPakd8IB mItQQpSUUjj1iHU5OIELg79ygnOvSLHXKX5HbxwVN8If669l3VqUGiyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date: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; bh=nF1njZj72dQx8w/SswHlYTPyN0TxHuT9t3Q3yKEBX 6w=; b=FrEOb/VLX5om8qwbzDo8WSu81MmfNCWZIDrCVLRSdocXPjW7XSu5CClOk YOJbKhAp6RxqaRhDEgdfThzKWhR+xlXkFJayI9VqX5IJD2jvXfl7EIoPdRo0FVcR PR9uGupYloGSilZvw0IJJUwcICbaekgr9t9Wds2OT2aOVYwcU/4xIX8uKSkAb+zr deh5ntd+a6GrgMCO4bHqPraU8RQm6wtwAb6ikED6V+zcJJx0MhfWJCIxFMfVfy5p YG5CU3NKl1TUD2nE0/lw46EorF2hj9F+Rs6JJPNnVkxwTAlzgMvylufiWDYCvLyf Qi1UGZvSPSEbHXZBc+X/25XNgYQHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedtgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 13 Feb 2022 06:29:37 -0500 (EST) From: Thomas Monjalon To: wenxuanx.wu@intel.com Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, dev@dpdk.org, david.marchand@redhat.com, Harman Kalra Subject: Re: [DPDK] /lib/eal: fix failed to stop device monitor error Date: Sun, 13 Feb 2022 12:29:35 +0100 Message-ID: <2445962.TLnPLrj5Ze@thomas> In-Reply-To: <20220211084131.72606-1-wenxuanx.wu@intel.com> References: <20220211084131.72606-1-wenxuanx.wu@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 +Cc Harman, maintainer of interrupt subsystem. 11/02/2022 09:41, wenxuanx.wu@intel.com: > From: Wenxuan Wu > > The ret value in rte_dev_event_monitor_stop stands for whether the > monitor has been successfully closed ,and should not bind with > rte_intr_callback_unregister,so once it goes to the right exit point of > rte_dev_event_monitor, the ret value should be set to 0. > > Also ,the refmonitor count has been carefully evaluated ,the value > change from 1 to 0 ,so there is no potential memory leak failure. > > Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event monitor") > Cc:stable@intel.com > > Signed-off-by: Wenxuan Wu > --- > lib/eal/linux/eal_dev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c > index bde55a3d92..4646e8a550 100644 > --- a/lib/eal/linux/eal_dev.c > +++ b/lib/eal/linux/eal_dev.c > @@ -384,6 +384,7 @@ rte_dev_event_monitor_stop(void) > close(rte_intr_fd_get(intr_handle)); > rte_intr_instance_free(intr_handle); > intr_handle = NULL; > + ret = 0; > > monitor_refcount--; > >