Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp258891lqp; Mon, 10 Jun 2024 03:18:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkoEZGVaHyXE4CEjEVdEjPMpSaGx5dC707Hn+JScqVhSTRFiHDkg54Ter5CMht4QaEGZ3DwebdfV3R0ssIGBIUcekrpioc7PZO7ZY6Jg== X-Google-Smtp-Source: AGHT+IGnRRcx/iK2FaVPerOgpXAIhC4b5kpMEOLv4NDmFr2OIHUp8NGnzzqUsTpHXemukJJ+dE15 X-Received: by 2002:a05:6358:768c:b0:194:9edd:966c with SMTP id e5c5f4694b2df-19f1fec9fadmr1424817655d.18.1718014681136; Mon, 10 Jun 2024 03:18:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718014681; cv=pass; d=google.com; s=arc-20160816; b=sMVkXVR/8r0nyyNVMFwdDH4DXZ/zwqNwCDs6sRdjnnzUPjCQj0Q9BnEjUpZURi6emw IzZFvFIj4viBb4V93RUtVyDWv3BWyO9SYBub83fbJusR53SxOZC85hajMQidV77cd8ik dfzFuglJskOXuhHPC02U7aBzq2ProwPN0NzysQCuK3hhzkI7cQHNOhekEPXLM3D7HzIZ 82W7bXkarUOQrvup3GrCcKWwRXkZh6oTIASWsrLZc06Jsxl4jdDL11YTcGmiZlULll8Z DOUHrq1MTxGtWVmkV2/W5qxQ7cJ2ERX9CuVVnPB7ia+GAnHKkiS2KCgwAzLqRIUiUZtq iQQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jUL5iXI6otSB/ZH3DI7lxaIqljjSVFn+Rd8a9eZdbdo=; fh=WDJ1ZGCQKT0b2JP4pj8E3467qKmXXYaPJ8Fd7ydqKaA=; b=Ir+5wK1N4J4BOhWlaElciR9rMY2ZRnQlutdzmChiw64yY33AMsAeA5dfnoi835PUYA +4nLZLaI/f67PBWPJZZHU/5lU64jvoUmAxotuPNs6UBmC8JnjbqEl4wxDqKmR1inK3Ko GdqYyyyEqrLdclnT1QG67B2Ryh0SckqAhawTbbqgb1PN3kn0skVGpXbcWZU4DtGlyVlc kXjxqal1xcTeCXdMUAkvJ9GdNPlJ+m3GEBe75NNGcHCBKui6oUdau3STE4Y3I10qp3Xp q8M9B/T2VlnKKlyYC6rRkDTuzAdvgeXW0NIT9kUyAc/zULmO7mOlnnIOgSSwMxlFNfnR c8nA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-207963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de275ff4bdsi3358365a12.482.2024.06.10.03.18.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 03:18:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-207963-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207963-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 39ABFB243F7 for ; Mon, 10 Jun 2024 09:47:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3C4D757EB; Mon, 10 Jun 2024 09:47:45 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B1F0CA62 for ; Mon, 10 Jun 2024 09:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718012865; cv=none; b=Pf1asYI0ByAR5CTwBfAO9rIHHxRwH8o/ghD5byN0xSblMVuW5KAHHfLLVToMAU4ioehCZU4B+EymHKusdr+j0ioZIxMEnldteVkMKIpYlPqOr9AA+AvpHA7TE2cTZfF4LMAaTj6EDvGJbLoOWAkTt6fGlhPjvhhY7Mjgt1tFlFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718012865; c=relaxed/simple; bh=VQ/3JhnLna7rWk78B1WLCHGyauw1n1qafP09tVEkGcc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=AbJK7DHEJ6j9d80ddklfshdGyZQBPsXA/nUWYAPfu9bdmp6kn8MSllplLMZyjt2UelUXFhJAGAPqMfCQAoCdYxMWlmLkQjpzwn4lk4TJz1FW03/4xwQ3+xllGhJHOCpHYh6NpTPC0z5N9txMS2Ddj6NqcLho4jB+uJfY5ZoBFvo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DCB0212FC; Mon, 10 Jun 2024 02:48:06 -0700 (PDT) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 180E93F73B; Mon, 10 Jun 2024 02:47:40 -0700 (PDT) From: Suzuki K Poulose To: coresight@lists.linaro.org, James Clark Cc: Suzuki K Poulose , laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org, Mike Leach , Mathieu Poirier , Alexander Shishkin , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] coresight: Fix ref leak when of_coresight_parse_endpoint() fails Date: Mon, 10 Jun 2024 10:47:31 +0100 Message-Id: <171801275290.708723.11055477791978848818.b4-ty@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240529133626.90080-1-james.clark@arm.com> References: <20240529133626.90080-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Wed, 29 May 2024 14:36:26 +0100, James Clark wrote: > of_graph_get_next_endpoint() releases the reference to the previous > endpoint on each iteration, but when parsing fails the loop exits > early meaning the last reference is never dropped. > > Fix it by dropping the refcount in the exit condition. > > > [...] Applied, thanks! [1/1] coresight: Fix ref leak when of_coresight_parse_endpoint() fails https://git.kernel.org/coresight/c/7fcb9cb2fe47294e16067c3cfd25332c8662a115 Best regards, -- Suzuki K Poulose