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 898B8A0C40; Thu, 15 Apr 2021 23:29:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C514162484; Thu, 15 Apr 2021 23:29:56 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 5DE7A162483 for ; Thu, 15 Apr 2021 23:29:55 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BD9F35C0121; Thu, 15 Apr 2021 17:29:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 15 Apr 2021 17:29:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= XFzhmHCGgQ3/pgSH83ih7cLXfdXW5ZI7y2g6mMwDRoo=; b=QxQueDJXh47k8kXR HkdPO0JSuNneUXsaNARqpViJQPUz/nPcdJKFuJb9dQmGAYKcrPqG7elL3qneWxcr pufl4tG2X5dZcCtTvanttNZMwF6YmKChfO5sX8l5S+uEEP6M4pMXFxOPFIY2HEtn EF8LZxbNHEEM1Idx/jrHXHHd14rL0Muz1v6HwT/AXWVRH+KNO/UfWumeKlcGzWRJ JDqhshKfYnMRvrLY7O7S00TvD7h90wS5q874IG5nqW1xtyDaK9b2PMJuo0oC1BXl JIBt4VnjfuN5FOhYNlyikH3Yro94nl2+vcEfs00DHWc2oPKypmEavue8UPeN/hl5 6joBRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=XFzhmHCGgQ3/pgSH83ih7cLXfdXW5ZI7y2g6mMwDR oo=; b=ETaH6ce+wKidqPG6mJj/W1Chgt2u2IjVFRCUgK8l2FHdb1EV7p/dyfR2H Fik2GzpYtn+EOgyHrxWwWQ2hOBN9FknMyYgJLrnVSzylOg89JWeyDK4jlz2giNyc 946UokUSyCNEsvjsEmWlF1FHLnN8nH/I5yTZFVT5oRYrKDuon2a7lIxpkcC9+PBB Q+yIM+rhedEzhE6HArWGraYvQPVTcggVWqy1Hp9nDBemPkcW5F9573YStxJOqqQ8 yvdZhhYxeKi9DFjwiPEd79D0G19xdZr7+gIjh07S9giMjmhpeEVMnN1nkp77M2kU ewdA5XeEWJwGru2K5diVe/amqNIfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudelfedgudeijecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 09DDB1080057; Thu, 15 Apr 2021 17:29:52 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org, David Hunt Date: Thu, 15 Apr 2021 23:29:51 +0200 Message-ID: <6276058.9Os0sLVhIO@thomas> In-Reply-To: <572691ce-b0c1-d13c-1315-ea7600e1ad24@intel.com> References: <20210407155642.435964-1-anatoly.burakov@intel.com> <572691ce-b0c1-d13c-1315-ea7600e1ad24@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] power: fix use-after-free in pstate code 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 Sender: "dev" 07/04/2021 18:10, David Hunt: > Hi Anatoly, > > On 7/4/2021 4:56 PM, Anatoly Burakov wrote: > > Previous fix has addressed the incorrect handling of `base_frequency` > > file, but has added a use-after-free error due to the fact that all > > further code paths will lead to an `fclose()` call at the end, so the > > additional `fclose()` call right after processing the file was > > unnecessary. > > > > Coverity issue: 369901 > > > > Fixes: 8a5febaac4f7 ("power: fix P-state base frequency handling") > > > > Signed-off-by: Anatoly Burakov > > Yes, removing the fclose will do it. Either that or add an "f_base = > NULL" after the fclose, but the fclose removal is fine. > > Acked-by: David Hunt Applied, thanks