ock
                              for more information.
                             [URIs: valinux.co.jp]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [213.196.21.55 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

epf_ntb_epc_destroy() duplicates the teardown that the caller is
supposed to do later. This leads to an oops when .allow_link fails or
when .drop_link is performed. Remove the helper.

Also drop pci_epc_put(). EPC device refcounting is tied to configfs EPC
group lifetime, and pci_epc_put() in the .drop_link path is sufficient.

Cc: <stable@vger.kernel.org>
Fixes: 8b821cf76150 ("PCI: endpoint: Add EP function driver to provide NTB functionality")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 drivers/pci/endpoint/functions/pci-epf-ntb.c | 56 +-------------------
 1 file changed, 2 insertions(+), 54 deletions(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c b/drivers/pci/endpoint/functions/pci-epf-ntb.c
index e01a98e74d21..7702ebb81d99 100644
--- a/drivers/pci/endpoint/functions/pci-epf-ntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c
@@ -1494,47 +1494,6 @@ static int epf_ntb_db_mw_bar_init(struct epf_ntb *ntb,
 	return ret;
 }
 
-/**
- * epf_ntb_epc_destroy_interface() - Cleanup NTB EPC interface
- * @ntb: NTB device that facilitates communication between HOST1 and HOST2
- * @type: PRIMARY interface or SECONDARY interface
- *
- * Unbind NTB function device from EPC and relinquish reference to pci_epc
- * for each of the interface.
- */
-static void epf_ntb_epc_destroy_interface(struct epf_ntb *ntb,
-					  enum pci_epc_interface_type type)
-{
-	struct epf_ntb_epc *ntb_epc;
-	struct pci_epc *epc;
-	struct pci_epf *epf;
-
-	if (type < 0)
-		return;
-
-	epf = ntb->epf;
-	ntb_epc = ntb->epc[type];
-	if (!ntb_epc)
-		return;
-	epc = ntb_epc->epc;
-	pci_epc_remove_epf(epc, epf, type);
-	pci_epc_put(epc);
-}
-
-/**
- * epf_ntb_epc_destroy() - Cleanup NTB EPC interface
- * @ntb: NTB device that facilitates communication between HOST1 and HOST2
- *
- * Wrapper for epf_ntb_epc_destroy_interface() to cleanup all the NTB interfaces
- */
-static void epf_ntb_epc_destroy(struct epf_ntb *ntb)
-{
-	enum pci_epc_interface_type type;
-
-	for (type = PRIMARY_INTERFACE; type <= SECONDARY_INTERFACE; type++)
-		epf_ntb_epc_destroy_interface(ntb, type);
-}
-
 /**
  * epf_ntb_epc_create_interface() - Create and initialize NTB EPC interface
  * @ntb: NTB device that facilitates communication between HOST1 and HOST2
@@ -1614,15 +1573,8 @@ static int epf_ntb_epc_create(struct epf_ntb *ntb)
 
 	ret = epf_ntb_epc_create_interface(ntb, epf->sec_epc,
 					   SECONDARY_INTERFACE);
-	if (ret) {
+	if (ret)
 		dev_err(dev, "SECONDARY intf: Fail to create NTB EPC\n");
-		goto err_epc_create;
-	}
-
-	return 0;
-
-err_epc_create:
-	epf_ntb_epc_destroy_interface(ntb, PRIMARY_INTERFACE);
 
 	return ret;
 }
@@ -1887,7 +1839,7 @@ static int epf_ntb_bind(struct pci_epf *epf)
 	ret = epf_ntb_init_epc_bar(ntb);
 	if (ret) {
 		dev_err(dev, "Failed to create NTB EPC\n");
-		goto err_bar_init;
+		return ret;
 	}
 
 	ret = epf_ntb_config_spad_bar_alloc_interface(ntb);
@@ -1909,9 +1861,6 @@ static int epf_ntb_bind(struct pci_epf *epf)
 err_bar_alloc:
 	epf_ntb_config_spad_bar_free(ntb);
 
-err_bar_init:
-	epf_ntb_epc_destroy(ntb);
-
 	return ret;
 }
 
@@ -1927,7 +1876,6 @@ static void epf_ntb_unbind(struct pci_epf *epf)
 
 	epf_ntb_epc_cleanup(ntb);
 	epf_ntb_config_spad_bar_free(ntb);
-	epf_ntb_epc_destroy(ntb);
 }
 
 #define EPF_NTB_R(_name)						\
-- 
2.48.1



From - Sun Nov 30 15:12:18 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197675-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id MIUlKs5eLGmXOzIAYBR5ng
	(envelope-from <stable+bounces-197675-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:12:14 +0000
Return-path: <stable+bounces-197675-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:12:14 +0000
Received: from sv.mirrors.kernel.org ([139.178.88.99])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197675-hi=josie.lol@vger.kernel.org>)
	id 1vPj5y-0000000EFtE-1fRV
	for hi@josie.lol;
	Sun, 30 Nov 2025 15:12:14 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by sv.mirrors.kernel.org (Postfix) with ESMTPS id 509FF3A3508
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id AA0AF286D7D;
	Sun, 30 Nov 2025 15:11:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b="WH+DbRxA"
X-Original-To: stable@vger.kernel.org
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011035.outbound.protection.outlook.com [40.107.74.35])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D64D92848BE;
	Sun, 30 Nov 2025 15:11:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.35
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1764515479; cv=fail; b=s1FQwK4+uF8MU6EMCHzzlpmcS14MXVjQotsQQwbj69k63eSu21pQJ9tjPFpmnHcOXJoohBnF24NAKVPqc0NsZHDbpWmmVlbah4QRDRtoX0FvSnxFPuVN/ZQb1L/eSvBFugHhefTEnQ8xOP9+h5U8WDrNsU0hFJ/jK6SxNVEPocw=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1764515479; c=relaxed/simple;
	bh=uzid1QV1XJC1GmqV47rbqHFWIolix5fhpM9QQZi9sHo=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=M6gqY+t3py7IoAT9KMVPXKeVrp/q0EunPuC/sFaJ+6RIV0NuNBwTiMu2yYLjHaTia+nbFPmQEqDG865JNjlrorkIX+8fax6SD1AP1UqCkpEYQqwiFJQR/Vb9FxMgswsjRKVcz2/2QlfmCveO2Uwr7YIXPArnmULN9q+kdvtAff0=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp; spf=pass smtp.mailfrom=valinux.co.jp; dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b=WH+DbRxA; arc=fail smtp.client-ip=40.107.74.35
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valinux.co.jp
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=UmOaCwpbn+klYv+Z7BioVWzHSyosfw11uN9OSe7OeBKWwec2PLwlJqkmj5DfcR7G9H5wPXDiXlue/pvzcxS63HrcD0xrovxoPizU/Igya7gbLfOBZXfCQRtbmszWDNL9DUYRsKKABTAprR+jWtvo9SK6TA7RRFEhKFMu6oU2DLgRdL6pVrO6phuoujYl8t8D8piN9IsUP2oPD5GsShQ1stFLHQNjp7kCex8xG4ugW3Pad6pW7EzgglP1accS9U9avtxxh4MYBRPJ5bVgcB8ujdSpb+7dPz7uTS91J73eJRATl2Vdb1DcIok8bnFb/sN7k63+sg8/WqT48NW0f11TQA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=4K0QQwb53P5cZecHOtS9esSM/n+3CJ1HinO8/AkO2dg=;
 b=dzXGylWeSPbPhFEMIYyDjFr088JaXLJvNmdDX1k1u3onCoPaLle1r65Qn9l16a1qlgFtDzYQ9XYTBXnCwcsXt7kvxaY/k4ZhdGAI0eQfgEHTd4UxTb92D2V7aCTNtu1DHafkNZt4c+uGQbxMXTrXDQBXzQ+e6/2cBVgn7ysJaokiO0DfFg7YiTgwp2ZMyZeUq7lJpQsx4FE7v20+wHgfnM5H2w0NJqo8zbRPZpSklrMx9fZBvSsnEYrZ3g1/VQoEK6OPqtmdP3u8bMML7pRea9m+c2+ghKXPeSgqwe23egd6SxsuBqLKgChh9I1hwrtIJSgRJCy6He1gJoNQk9dC6A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=valinux.co.jp; dmarc=pass action=none
 header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4K0QQwb53P5cZecHOtS9esSM/n+3CJ1HinO8/AkO2dg=;
 b=WH+DbRxAQNfGzeXAW62QnzatXNNYwdzKId7kjzB/G/UrHwqTKP0OFSB7BYBk8Nh/5TV27fxw3J3Gs/2fbeQm826qaxjUXflEk5V/yy5bNT8IcHN9KSxyRhBvdae30MfBW4re9MPcG6ITnWrOnM5Ck2IVPBntPEz2kQWs8tZ+pdE=
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=valinux.co.jp;
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:24c::11)
 by OS9P286MB3865.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:2d2::12) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.17; Sun, 30 Nov
 2025 15:11:10 +0000
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03]) by TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03%5]) with mapi id 15.20.9366.012; Sun, 30 Nov 2025
 15:11:10 +0000
From: Koichiro Den <den@valinux.co.jp>
To: ntb@lists.linux.dev,
	linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Frank.Li@nxp.com
Cc: jdmason@kudzu.us,
	dave.jiang@intel.com,
	allenbh@gmail.com,
	mani@kernel.org,
	kwilczynski@kernel.org,
	kishon@kernel.org,
	bhelgaas@google.com,
	jbrunet@baylibre.com,
	lpieralisi@kernel.org,
	yebin10@huawei.com,
	geert+renesas@glider.be,
	arnd@arndb.de,
	stable@vger.kernel.org
Subject: [PATCH v3 5/7] NTB: epf: vntb: Stop cmd_handler work in epf_ntb_epc_cleanup
Date: Mon,  1 Dec 2025 00:10:58 +0900
Message-ID: <20251130151100.2591822-6-den@valinux.co.jp>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20251130151100.2591822-1-den@valinux.co.jp>
References: <20251130151100.2591822-1-den@valinux.co.jp>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: TYWPR01CA0041.jpnprd01.prod.outlook.com
 (2603:1096:400:17f::16) To TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:24c::11)
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: TYWP286MB2697:EE_|OS9P286MB3865:EE_
X-MS-Office365-Filtering-Correlation-Id: 80eb260c-b69f-41b4-a3c3-08de3022b1e7
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
	BCL:0;ARA:13230040|366016|7416014|376014|1800799024|10070799003;
X-Microsoft-Antispam-Message-Info:
	=?us-ascii?Q?CWAUc4xXkzzDOUGEoxZV6SHeWKj5HOD7WjT+JNfmXLVCYdOO7Q8E0llN2g4q?=
 =?us-ascii?Q?rJ8zs2zvGMGiNMGcOnMmPQWwwWV1/pm1JGyyxhln/WnM/sUHxLjktq0DXdkZ?=
 =?us-ascii?Q?/GX25VpvQXWNH1/WbgEm4gwThHUaCBC770gbpacobPj/tV3PGEUxhaI0pFQX?=
 =?us-ascii?Q?v93I4nEzMzS7DZNLil1mIev6rQ/KdDwSYQ6aCx8E5ejkLizHXFiCqbNvwFtV?=
 =?us-ascii?Q?XxarUkuK4eKm3sAZLl4DeqnPsum7+qSoKuQjw1+HzI8IKdOhwWsyWBdzy+9f?=
 =?us-ascii?Q?/Fj3tdLpWyjVwoPQlR0TyS44WCmlYXnv5us/FmPKyt3MnA0zKVzxKenSexu7?=
 =?us-ascii?Q?lvRHtCwJpsmJvL//KurN+8CjJtLKCDerTIbxWd9SgzBKNaoeXDJUa0TklLM2?=
 =?us-ascii?Q?fr3+lhVMiACSPoehe2ijO5iQ8AlyCPy3Ylzq7+awXvVFFanZRGHY/1Bz0da5?=
 =?us-ascii?Q?1Dh2LjWD9Zw02XgceXuECjtfE7TkiqEHUxo69W9m885sS/lAZBOZL/WvdE+x?=
 =?us-ascii?Q?MDLkxW3LznR6EW3Tje7tPy1WLpqAgycYfftMecW8dYRuPp3t3YzDKZRnljxT?=
 =?us-ascii?Q?76g8GPhblXv9VoWTuigHrdyWcZ20ELRdeWoqBwABW/+ZoboMQSsjFhUlk8Tk?=
 =?us-ascii?Q?fRjx/faZxVWq3p74c47Av5I7/IxWjn/gxT76X7C0pxT6/tu+1lAsKgXrixW0?=
 =?us-ascii?Q?yJXdOCp8vbDpBN+bgPsqBkeXw789W9RrRYxArOuvtrOCCf4bLoMllSBSVAj2?=
 =?us-ascii?Q?jp59su8rGqYXUkHSuJLVkjE80bMGNQB+Rldsm6hVBoE3athiT/5FXww4m28X?=
 =?us-ascii?Q?s/Fguap6FWBrLu1cyNSqQsnjsLRW5McaWQ3VbPijyApKst2qeOdD4zN51x0r?=
 =?us-ascii?Q?xQwJb4k8nK8xbCeFV1LBWd2lxMYBNwbP6U557Ju7rVllXm3eFfMJNHR8buuv?=
 =?us-ascii?Q?y5u3UQKaJFs0z0Qn3aid8y4BWrY72/ebCAMGRoxOA6NiacsnIv3xuse3WZQ4?=
 =?us-ascii?Q?7lptcmYr7rJP27EFgW6YvcVt5kKQyB9hZJijnO1zyRtwfnPK76swsiG/dd/P?=
 =?us-ascii?Q?3XpQmBh7J3PWL/7ZoInYA9mE801BOdzfTmPKnPkou77xSAmRkjkBhx4t6lZ0?=
 =?us-ascii?Q?zWuV5EJjf1BWt5dONHUkWk9hn9bdczyWvYa1tKvQO2yay6nnjEsZ2S9D0VzL?=
 =?us-ascii?Q?XfaRYV2UMeRUfDNQPdCqlRVhRT3Y3SzHdDwLEuivxvUBNAAsSMC6NX7Dnl6P?=
 =?us-ascii?Q?IGDyISK/MSbIPmqG/ai1GJI3wJS8ZJSE4Mncbd8/dqar8KEAIRbjEOiLklR1?=
 =?us-ascii?Q?gj7E6qQPHKQRJc49Y1osOxN0ujDf8glg/l3bOHE1SIF5+YiwTkM3s4xzT1IK?=
 =?us-ascii?Q?Tm0WjIy8x57xThV0xvEMU9SgAC7boCWQHxtJP6EheESYIDVrCTa3UiCPtetX?=
 =?us-ascii?Q?In2wHrtdyry6na1XGjn5ipTWcbvrM8JN?=
X-Forefront-Antispam-Report:
	CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(10070799003);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
	=?us-ascii?Q?KsBbsS0tU/v5Rf5SAqt20UGoNYhwgmS+HaX6qYAiP49AH9c61IGR61l8jtDg?=
 =?us-ascii?Q?06fNG6dR/tZdo9UkzMA9WP4aq8Ii++tk999nwRiUscfReBo2NAEE1X17Ah1o?=
 =?us-ascii?Q?oGUx9gvlc2fmRQl6XEUZE0GF64Kbn5sBSXJH0ZCa4WgGqP98/bYBXQS7/CWm?=
 =?us-ascii?Q?R6K2Gu3GL5P/AmsBVzeDNKXwqii5W6Nha5dDtVghQ2fG75qHD1i+vtxLXGwt?=
 =?us-ascii?Q?E/61KZzBvgwaZaJrbl3NCf3ZWJvtb1Y7PWJby4nCb5HZRY0OwUzuURBTyELX?=
 =?us-ascii?Q?6DmcvDx9IuQDC6jQ6mdDZsba0M9QGvwyHDL97+dnzTeUpHjZGTsM7OSYevGW?=
 =?us-ascii?Q?/Pmc3LS+x7ey5nxu68Al5e/W8tOijKnVUSUtfparvC6xTfLIMCs2UFnkmV9P?=
 =?us-ascii?Q?FRnqMntjMbf/6AtO8D6UxS1BSWe43YEHC3J4ZA+dBqdNxElDzL1DpmW4A5gm?=
 =?us-ascii?Q?KR1h7564X48zJdOlHqey0VsB7SBWB0hJdFkQkTiQTJzVqD+N/MIY4nVsyrx2?=
 =?us-ascii?Q?o3bKutwEMb3M6CEdDWS23lMVAw1I/S9MT3+5B79fWWwlSDVxZg0rS/eWmQoE?=
 =?us-ascii?Q?ZpUQZDEygwuRiU2njP3ARfS2bcy5zcZQISgqnACJ2DJ9fkmosro6Lr+vt/pw?=
 =?us-ascii?Q?TBH1RXnGH4ODtpr7e3T4VHP8Hl+9EBghOM42Kp62fF5KKfS15+IyvE1Q9ofU?=
 =?us-ascii?Q?NcddwqT7QFh0TbVK3qIwoREVi/V9JmaX30H3Mk316cctPmGszrWavJNUY8ge?=
 =?us-ascii?Q?m13o+VFqL9bJ88Qw2XbEH5bnot6fj5Urhirc6cG5XWPTbCRGE8UPzLIOFNp+?=
 =?us-ascii?Q?ovdcqoELGb366MumLZPso2FnxiD/SRAEhKXvTAEfm+hUEa37G1sPquxnqDWL?=
 =?us-ascii?Q?JyLGyYDamw0ht02FsncvZUB/0TMl3CepxSfRXV3WB8qrABF12vF0A3bTlL84?=
 =?us-ascii?Q?ousM0cnUlq0Y7ZwGn3Q/W8T18HY0r1iN0Fi6bbb4NIZSczfNvircHjBpCQXh?=
 =?us-ascii?Q?iTbX5/ojTU19GMZCrHbOp/srpoVDGNoEFqAm+rHkKDsZaVYPUYyIfEJ7Hukz?=
 =?us-ascii?Q?TBc2pYYz0eVgzWeafM4l4YV0ghDvKiFI+abMG8iBCxzNMYq51rmeLGUkdfOo?=
 =?us-ascii?Q?YoUr6KvNz1RiB7c94XCczU1Ca2xpJmgYyRHT0JnBByPD+inZaDZ0t8lpXWu8?=
 =?us-ascii?Q?Lq/L/ty2z7vetEyxq5w/gDoHvowA0UY1wjXhQXyjOetUwrQQlwW7shEMB8m9?=
 =?us-ascii?Q?0KtVrgFgct/QPZAkQga529LBdF6slht3NasbR6U/8MxFQ9aa7A4x3K7F9IDT?=
 =?us-ascii?Q?bLIqSnpx21qq2V2aPYEvQBbEfL+ZLfW9r10vhElo3XqkT2TR1HrHP5PZ56hu?=
 =?us-ascii?Q?2Fc2eYiAnzgDRewjWDnTNL3/y95a+eW8VLOfwDYuBa3yWdb27Xeu1Wp13MrT?=
 =?us-ascii?Q?Y8jyw9kSMrZ+/Tth7W9z6bqcwOI8HTDQvZ8BGOYRAQK/wwkJZCejacrr7xY0?=
 =?us-ascii?Q?A5x0pEBnmq7FBwMH4gRivPORXmcS9QmKX/W/nuxZrYMyLpLvDnLZy6cn7QtR?=
 =?us-ascii?Q?S+kefFqp2iXVN0i9NyZEp0Ux8wKUtIQxiOm4vhCwmboKO9PV0e835hKmoC0h?=
 =?us-ascii?Q?vlbJuUwoFoWzAWrt15Jef/4=3D?=
X-OriginatorOrg: valinux.co.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: 80eb260c-b69f-41b4-a3c3-08de3022b1e7
X-MS-Exchange-CrossTenant-AuthSource: TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2025 15:11:10.5505
 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 7a57bee8-f73d-4c5f-a4f7-d72c91c8c111
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: tzcO4rijItEf6iuTEFkdtBynhWZ7NyuEjkeTVhO61K8Emp3iDIYuM7wLZYzeHyzamgFp62hBP2aTrC+sFOxxrQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9P286MB3865
X-DKIM: signer='valinux.co.jp' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: valinux.co.jp]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [139.178.88.99 listed in list.dnswl.org]
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

Disable the delayed work before clearing BAR mappings and doorbells to
avoid running the handler after resources have been torn down.

  Unable to handle kernel paging request at virtual address ffff800083f46004
  [...]
  Internal error: Oops: 0000000096000007 [#1]  SMP
  [...]
  Call trace:
   epf_ntb_cmd_handler+0x54/0x200 [pci_epf_vntb] (P)
   process_one_work+0x154/0x3b0
   worker_thread+0x2c8/0x400
   kthread+0x148/0x210
   ret_from_fork+0x10/0x20

Cc: <stable@vger.kernel.org>
Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 drivers/pci/endpoint/functions/pci-epf-vntb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index 49ce5d4b0ee5..750a246f79c9 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -823,6 +823,7 @@ static int epf_ntb_epc_init(struct epf_ntb *ntb)
  */
 static void epf_ntb_epc_cleanup(struct epf_ntb *ntb)
 {
+	disable_delayed_work_sync(&ntb->cmd_handler);
 	epf_ntb_mw_bar_clear(ntb, ntb->num_mws);
 	epf_ntb_db_bar_clear(ntb);
 	epf_ntb_config_sspad_bar_clear(ntb);
-- 
2.48.1



From - Sun Nov 30 15:12:18 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197674-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id MKnrCM9eLGmXOzIAYBR5ng
	(envelope-from <stable+bounces-197674-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:12:15 +0000
Return-path: <stable+bounces-197674-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:12:15 +0000
Received: from dfw.mirrors.kernel.org ([142.0.200.124])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197674-hi=josie.lol@vger.kernel.org>)
	id 1vPj5y-0000000EFta-3fwi
	for hi@josie.lol;
	Sun, 30 Nov 2025 15:12:15 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by dfw.mirrors.kernel.org (Postfix) with ESMTPS id AD1434E114D
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:11:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D2EE285C89;
	Sun, 30 Nov 2025 15:11:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b="tMcxlBQ6"
X-Original-To: stable@vger.kernel.org
Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011051.outbound.protection.outlook.com [52.101.125.51])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AD8128467C;
	Sun, 30 Nov 2025 15:11:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.51
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1764515478; cv=fail; b=QVdKAg5I42jC9s82rtcvtp5HxWkZDuWnMFz7QD+IRTS+sDC8EEQtdBr9bZgNxol5vEoT6G/xFk1w9kl89aWMdwV5doLNyNroP4kFGWjxDFjub+2m7CpPVRFbzT47PG0iF2pXAIhj8RguO6yNMxc6Jc4QKDSeYWAjngbu/qpTG/4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1764515478; c=relaxed/simple;
	bh=O+25aDE86dw7kb8Igth+/Ni3EWo+0WC/Hj559OO8YVU=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=PckmTIEJw7FCTzoNpKYVcXDP+2bZvulR58bv2eRFIlMcqI+tBBLn7TETZ25izybQUWb2tIcNXGNzpY/q7da1fzL+m4+pbTt5yz2ueHeSJDO7Zu3FGZ79oaSCQvhwm2sr0zaKdyNdF3zdA+iB4jEISYGaw58Uq30umo7Q2Y6KK8M=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp; spf=pass smtp.mailfrom=valinux.co.jp; dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b=tMcxlBQ6; arc=fail smtp.client-ip=52.101.125.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valinux.co.jp
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=C7T6/dh9Bimi0tYgs8eM2uWFh/XVRgZSYHay6wnmalbBTJ7+Yy8r8WnRvhnSRyQm4Sjcchh+1HMJ+hRPfvko/mnHkbnS2o9RBi3xPCvJImpW3oMWu1btxLMAsWwvRUJP2Ok+g15iA0e9EwECnDi7LfKLGoTcPDWUxw5N2wvkzcQ80NHf6IldjjrymB+Achy5xd3y9mG3JPcQkTi4CloqHPwMvE2mEDZ7PBxQwNYFaMu3Nw6i8uYUIjgYQ4CtsdHBPibm7y7UteCOeqbHnUUJV5p7WxnrUUXRGdxz9BSOFHlhxKpsHygc9Y3YPuudfeQt+wX9gSDCwlXNtEUExaBVQQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=FKApDRV0CwAGwCQhi8dzR3dNnpAqxilqtJChT0fy6BI=;
 b=k7EzFy9eR/uqn7RyKJOLpY71kSklEp/TDKYstjBAZ4wKGCtyMSkwRAs66LrN5m8+nwhyz9SstiN11IAzUx9730a4zQ2pawEtHzPO2pRoITWxRWGJviI960rvzE7/QMcvCuVYxB6XEQLJnUbHCbEbvjzazBLDwnUnLH53WI7sG40rQL/rvKeV/BbK8e9auJ1qAnNbFOf+9mjSdGYx2yC6S0O6S2UC4oIGYjzyrqcJ9T1L4YYc7wfdAS2vgMhSgPqJSrg9EADUm26Jo+kf3Qi0o5LLE6TiackhfX0x9CPE4uXl+fC5MsSuXR3GB2A+lWLOpNMT/V1rVn8MnHNHbcM5WQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=valinux.co.jp; dmarc=pass action=none
 header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=FKApDRV0CwAGwCQhi8dzR3dNnpAqxilqtJChT0fy6BI=;
 b=tMcxlBQ6PnW7pSpzeBqTdt787BrvCvO794CCrXUqcrzCcSzBCzdRHHEGOkIKmN81ZDK+CZXmDVuTrG9RuIej1BWlz5Km23LjUhsiKhlWxhEeZDIR2nQBUbEcGZBY0BryQnLUs28OirMdQE52/A3z6VcsrvbmxH+sblYavKG3KOM=
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=valinux.co.jp;
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:24c::11)
 by OS9P286MB3865.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:2d2::12) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.17; Sun, 30 Nov
 2025 15:11:08 +0000
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03]) by TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03%5]) with mapi id 15.20.9366.012; Sun, 30 Nov 2025
 15:11:08 +0000
From: Koichiro Den <den@valinux.co.jp>
To: ntb@lists.linux.dev,
	linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Frank.Li@nxp.com
Cc: jdmason@kudzu.us,
	dave.jiang@intel.com,
	allenbh@gmail.com,
	mani@kernel.org,
	kwilczynski@kernel.org,
	kishon@kernel.org,
	bhelgaas@google.com,
	jbrunet@baylibre.com,
	lpieralisi@kernel.org,
	yebin10@huawei.com,
	geert+renesas@glider.be,
	arnd@arndb.de,
	stable@vger.kernel.org
Subject: [PATCH v3 3/7] PCI: endpoint: pci-epf-vntb: Remove duplicate resource teardown
Date: Mon,  1 Dec 2025 00:10:56 +0900
Message-ID: <20251130151100.2591822-4-den@valinux.co.jp>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20251130151100.2591822-1-den@valinux.co.jp>
References: <20251130151100.2591822-1-den@valinux.co.jp>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: TYCP301CA0082.JPNP301.PROD.OUTLOOK.COM
 (2603:1096:405:7b::20) To TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:24c::11)
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: TYWP286MB2697:EE_|OS9P286MB3865:EE_
X-MS-Office365-Filtering-Correlation-Id: 8398b069-768c-41b4-7782-08de3022b0be
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
	BCL:0;ARA:13230040|366016|7416014|376014|1800799024|10070799003;
X-Microsoft-Antispam-Message-Info:
	=?us-ascii?Q?ZUv4VVLvRJCX+cGDFR2jfMg9QbRpKidK/M7uMobC3q845ntv30AZe9IMoMs1?=
 =?us-ascii?Q?snqMyuafDdm0diJZph7SrJPW4R5AuXB04JVwVTANFILmgEQzsgksncXxlXue?=
 =?us-ascii?Q?SkNJ2nvzZA37Mc0EfDNbfG2Mhy0bSNFcGtNrrlwKVIbyqV6UayzVObVsmZyN?=
 =?us-ascii?Q?RtCIsbPobvN3HriUgib6jnNnvsoq8jMiRyW6ct+oc0Y3xhk4WSaWQGn1208e?=
 =?us-ascii?Q?p0yrZ5bjYg6RWj9GsRBLk4vGe3496HdOx7hUpcRWoF05/mra0+ssMuJhxRQn?=
 =?us-ascii?Q?xgGsJu3C1kXH/apaBBxPv0VrFPkG2uL15lki18ETP7a772Np8QjUz3NQ6Fu9?=
 =?us-ascii?Q?4hSY+hhmm0cRzzAWuUyItM7fwUe7Cm8JowWHdE+QxHZEJyZX2msQi0VWi+Ha?=
 =?us-ascii?Q?w9A95jXRXHRz6PPUTt0TejIPRULNGA07hywskUIlw3RjPE49ffSy2bpGJBQF?=
 =?us-ascii?Q?BN49vqE+Bc0Slhmo/1CoQ+pScXIYBRGa5pkHi9onJ+GLTXsrKZ7UuODQpx/+?=
 =?us-ascii?Q?JaodIHflYAIwsP8sBy18WXTv6jJQpmjivMOIv/gg+Cr7h+Mw/dGov1v6w9NJ?=
 =?us-ascii?Q?RDqil5i5rDh6uxUwKPcq+xKrCVuN5IG8WrgcrbNVtsFLV6j9N+mjaJhf6F+4?=
 =?us-ascii?Q?Nz4pH+48e2nROh7z09Cj38B7QUc3/IDCUHOsGXPgf74vs+g2BrExZFbbH+rI?=
 =?us-ascii?Q?c1X4Fd9nIBtiPL4WTwKdblDofiSl3KlOkugOknT4/QUJ6Cw/yoyKV6/GY8gD?=
 =?us-ascii?Q?OFZ3f3wTtITjqf6r/HgCJvdAcOopF41Xt9AaMB0duOZJyY2ckrF3DEu+RJuI?=
 =?us-ascii?Q?gvlRkBsxxNkD22+Bw3sKZ8UBBVmlNftUabieEEq+COB/ckxi4Ms/dUUBZk1w?=
 =?us-ascii?Q?ParEfd+MnwZeDLes12REyZu7Kd10S4UAQ6Eew90Aje9IljStqC0nnKzvVoCn?=
 =?us-ascii?Q?3se+ZoSf5hGrzUeLiKO8k0i/prh1XicLl5/xEpKr/M4JBfhpuC+q/wSACI+0?=
 =?us-ascii?Q?gbdQ1Hyay7+MD97FRawlBZYTFMiNUiAyCC9KtNkfq9LFIem44XKWMagHj2MH?=
 =?us-ascii?Q?OHgc9nat0IrT7Ild5bnPG8BtJKTh6TuEl91tH3Qh8tYF5cM+cf6i630SMrWn?=
 =?us-ascii?Q?9M6SrMtncvlvgap9cYO8qj/HPTPB4d3eYq3UhkPlmu1cOWAJLB43zULZObTj?=
 =?us-ascii?Q?6yH5Vr6zKgp4bC2R60/Ttqd3Dzc3Vd39ZU9qELP6s+Ebs8SsI2GACK4GMBQf?=
 =?us-ascii?Q?akR3CH5J7HZcFgcibCnmzaBeBwb3VW58i9ptxq2lH+eWJ+6ebu+jWnodPunS?=
 =?us-ascii?Q?n/d3OR3zPu2As9hDXwcHM1eO09Ofxvg7rqpRPxkyzmv7nE8arNuS2w0rPiVv?=
 =?us-ascii?Q?F2EoV+loxe3AnnL8AhLDahmyLZW+ZJkVKJ7weIrWpaxIyvYqNYdoPGofqOoF?=
 =?us-ascii?Q?+KTwVokx859bA2YUJJe47SNlZVXSDh4p?=
X-Forefront-Antispam-Report:
	CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(10070799003);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
	=?us-ascii?Q?xMf3VO/t01LJuSa1rwRnqmD2iVFgRPgC8RC5EJ/C9Fv1oNJ2VeXOCoWfPeIM?=
 =?us-ascii?Q?ummMWNKRd5CCs1+NpZ5H7bA8jyAm6RiQxWEvd3/F2CTgxrIXmEuHNU6SpcUK?=
 =?us-ascii?Q?JAeDiLH9J3/+5quK4M/H8QmyyfM8FSOW/zRjczdL1CzbypWKIrsfS08qrdUf?=
 =?us-ascii?Q?p4aTrlllAy2dc/B0tCW8hleOHLXibLDbV3bGe+W0Kkk6oo9UY9O213pN4fdD?=
 =?us-ascii?Q?KMAeV4BYExTsKB2eWQ6yDvo+nZhqOgH9hUmD4SGmadPvARyj/Df8pjKfEPQ2?=
 =?us-ascii?Q?GclvmB1/S3B1FMPHUlllHG2EfT6DjzdUXOtQw/PORtFPgUcreyfqi9CRWcmN?=
 =?us-ascii?Q?3yUOOnC/uvW0SR/3zfWZuK2EB5ErWnIEHTrTbPOXpmgCJ/+WnRSBmpp0uVLj?=
 =?us-ascii?Q?WYjcMB4vxtttzCeyFVNpOmxJihdeEo32AfNwt3k9jt7CzUrpF6Dw6e5Y2jPD?=
 =?us-ascii?Q?cO8ugRE2SpzzxKp68CBJKtAZGj2ZdW4LDVDq9IBYH1lS6S9M1w3EE30ekg8P?=
 =?us-ascii?Q?OqoXCc7x3psbiCP7NtF/5z6jaIrVxVxgv/Agi7Tq9FS8ZjkcSP1nEHumCSUQ?=
 =?us-ascii?Q?N2GNEyDYiMwLSSy+UdqBKFBqLEkLhyqOHgd5CXYqfYfcDGvcWMD/3HTlUoOp?=
 =?us-ascii?Q?Whp9X4Q9G6/Q47kn9G1ksZLyA4UmAHbuAgCANUa+wKVbH53W0/i2MEfIOK8V?=
 =?us-ascii?Q?iUKPiiM224lZ2OFCwtXJCF4Bz6Skhj1RvOvxvdVBdMfIJFyhn2BUzSzRiLLd?=
 =?us-ascii?Q?gE/Nroc0uTRwgwp8ShcFIruqfYw6DcooNbI7Jjo+1EB3sdTRbDBZg1HmVeBH?=
 =?us-ascii?Q?gIOcrVvNjhQZb6XGAJNN8SqsbHgomfZKsTdYw2HLEKja5/Gf8MrWlYQUmE3/?=
 =?us-ascii?Q?pG3lgAYCwTQnLKqmO+C8I1nVZn3BbBnXArqhiUio1DUc6lxvbAy8bi9QxF3p?=
 =?us-ascii?Q?P5Z//2GXnfFraiNV6MOkcoTJTVGNu1dQDpgwH4IJXLjLVjhptQtrSZfYgccj?=
 =?us-ascii?Q?E1xiUklDfpV8ZYUHyjUJdoEY49zpsWON3EEyeYV5UmnhlBtSIJbkvhDXj3rP?=
 =?us-ascii?Q?j8hbXVuqEkcoT7D0C9C9A1tN6kSz6yA8LVb9mJ2P5jsR7JecCpM8lcVH766X?=
 =?us-ascii?Q?e8tStN3vYhDNM4PQ9VEszUjJyni9tXxG8wKGzZQ24DuVS1cUMdJiH4KIRV56?=
 =?us-ascii?Q?O8fEFLfVgyCFRZx8bRw3HOXQuc3I4InOA8dtPvIkpc7RhMoGv+EL+Mg0o2fb?=
 =?us-ascii?Q?pma+/HYmDCdNbZCjeDWeWJ565L073VqY94l3CK/gG15Zt0wC9noCrJAfzUo0?=
 =?us-ascii?Q?ug7u0AlsxeIWo1sgEDSLnI39WlZwoeTWIInVF41Jqbg2iinFE83glpwsIJIs?=
 =?us-ascii?Q?B9QJjew0eZ9anNlnbJoPMhFNZsRL5iI4wW16UExwywV04vibBteAp+Ink0I4?=
 =?us-ascii?Q?Jmr9ceEKZltwk0kJNaNinNPLquMpiA5lpWLkLNKMAyL88ukTSwaGIk+q46rX?=
 =?us-ascii?Q?H/5x6PIt9NKaJHzcXxCFMMe6MG+MoePYrgdaEFL3iKbqtYZFJY+QW7PlKluB?=
 =?us-ascii?Q?TxYCIgiCDzOJD+d/sHTfGe4NMJzq2wWy+kGTQaYK3FoDAULRnIZxF7dbzPgL?=
 =?us-ascii?Q?5cW1CkPbLyU0jANyZ5mFAzI=3D?=
X-OriginatorOrg: valinux.co.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: 8398b069-768c-41b4-7782-08de3022b0be
X-MS-Exchange-CrossTenant-AuthSource: TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2025 15:11:08.6103
 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 7a57bee8-f73d-4c5f-a4f7-d72c91c8c111
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: Dw1YdTgjv6qfPvUL40aEb7+1CpkslSbYSm//BKsQd7s+oZKG6Oi9eURgorSoK27eLfMJ+69jMyf/cG6TZqImoA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9P286MB3865
X-DKIM: signer='valinux.co.jp' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: valinux.co.jp]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [142.0.200.124 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

epf_ntb_epc_destroy() duplicates the teardown that the caller is
supposed to perform later. This leads to an oops when .allow_link fails
or when .drop_link is performed. The following is an example oops of the
former case:

  Unable to handle kernel paging request at virtual address dead000000000108
  [...]
  [dead000000000108] address between user and kernel address ranges
  Internal error: Oops: 0000000096000044 [#1]  SMP
  [...]
  Call trace:
   pci_epc_remove_epf+0x78/0xe0 (P)
   pci_primary_epc_epf_link+0x88/0xa8
   configfs_symlink+0x1f4/0x5a0
   vfs_symlink+0x134/0x1d8
   do_symlinkat+0x88/0x138
   __arm64_sys_symlinkat+0x74/0xe0
  [...]

Remove the helper, and drop pci_epc_put(). EPC device refcounting is
tied to the configfs EPC group lifetime, and pci_epc_put() in the
.drop_link path is sufficient.

Cc: <stable@vger.kernel.org>
Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 drivers/pci/endpoint/functions/pci-epf-vntb.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index 83e9ab10f9c4..49ce5d4b0ee5 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -644,19 +644,6 @@ static void epf_ntb_mw_bar_clear(struct epf_ntb *ntb, int num_mws)
 	}
 }
 
-/**
- * epf_ntb_epc_destroy() - Cleanup NTB EPC interface
- * @ntb: NTB device that facilitates communication between HOST and VHOST
- *
- * Wrapper for epf_ntb_epc_destroy_interface() to cleanup all the NTB interfaces
- */
-static void epf_ntb_epc_destroy(struct epf_ntb *ntb)
-{
-	pci_epc_remove_epf(ntb->epf->epc, ntb->epf, 0);
-	pci_epc_put(ntb->epf->epc);
-}
-
-
 /**
  * epf_ntb_is_bar_used() - Check if a bar is used in the ntb configuration
  * @ntb: NTB device that facilitates communication between HOST and VHOST
@@ -1406,7 +1393,7 @@ static int epf_ntb_bind(struct pci_epf *epf)
 	ret = epf_ntb_init_epc_bar(ntb);
 	if (ret) {
 		dev_err(dev, "Failed to create NTB EPC\n");
-		goto err_bar_init;
+		return ret;
 	}
 
 	ret = epf_ntb_config_spad_bar_alloc(ntb);
@@ -1446,9 +1433,6 @@ static int epf_ntb_bind(struct pci_epf *epf)
 err_bar_alloc:
 	epf_ntb_config_spad_bar_free(ntb);
 
-err_bar_init:
-	epf_ntb_epc_destroy(ntb);
-
 	return ret;
 }
 
@@ -1464,7 +1448,6 @@ static void epf_ntb_unbind(struct pci_epf *epf)
 
 	epf_ntb_epc_cleanup(ntb);
 	epf_ntb_config_spad_bar_free(ntb);
-	epf_ntb_epc_destroy(ntb);
 
 	pci_unregister_driver(&vntb_pci_driver);
 }
-- 
2.48.1



From - Sun Nov 30 15:12:23 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197676-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id 8E0LL9NeLGmjOzIAYBR5ng
	(envelope-from <stable+bounces-197676-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:12:19 +0000
Return-path: <stable+bounces-197676-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:12:19 +0000
Received: from ams.mirrors.kernel.org ([213.196.21.55])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197676-hi=josie.lol@vger.kernel.org>)
	id 1vPj63-0000000EG2Z-1g5q
	for hi@josie.lol;
	Sun, 30 Nov 2025 15:12:19 +0000
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by ams.mirrors.kernel.org (Postfix) with ESMTPS id 6D5093431A0
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:12:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 6825B28750A;
	Sun, 30 Nov 2025 15:11:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b="caTv2hyu"
X-Original-To: stable@vger.kernel.org
Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011051.outbound.protection.outlook.com [52.101.125.51])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 879AB285CA3;
	Sun, 30 Nov 2025 15:11:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.51
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1764515480; cv=fail; b=I20sWwbtrEc7RzZ+vUniUGEJo8qRRKbzlvq1JpkzjZk+8s8O2QUwHsu5FvZWQ+WjIsozeY9hszxoEdgMPhQRWpZ/Ym+CuaDYRouhgnoH6oo9DbCFPr00hnhqVT6H78D2PR/cYTjBG9E4x6cA2Ps46ctMiXk+FUlVuDBPZIKx8Gw=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1764515480; c=relaxed/simple;
	bh=h/I4zfZaV0SBGXfxmOco9smNG6ZXKd+B8eKMWZz3oQ8=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=fJA2EKP519iPZm7TPGOMok3VuvdHphJ/2AOF5izCwC/CrGzii5MpfvoiQriEEHrcFH4SyDNLzpWqiaT0AtL0b+xpQmh/mLrEzkWURB1FoTbmMM8hZctPvQoVSclggI7fknNlWUaA33dZTUi3cmCbJvt+6beoea6c0PDOsIFj9x0=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp; spf=pass smtp.mailfrom=valinux.co.jp; dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp header.b=caTv2hyu; arc=fail smtp.client-ip=52.101.125.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valinux.co.jp
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valinux.co.jp
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=pbFxmr7yihjqSTQelAHTBQDDx0fmLLIsueCX8w9ED1TbZk1bCewkF7KFKTahCYPhJjv3138tJpScVWuynRO1evkH/Q0aDsG3qrifdWutpHU/J/qwoI1L2DgCyyfjbFThujEc2fosHXV654O/oG6IbNjHWrUqPWFfeSRrkDY6aX/5ZY49fSqwYsXFxoJLDc3/HlMnTUyP7ssey+0Mk8L4irkwD1EwnAoAQelIRQJJwNG2kcqtfAGsrtaDqAUXzpivsbJx+pCll0K4rAB2JizzEUbdFgy086HxB7f+RV7dIzuui0lAgQa35Z5G1GRwlqA3IPJxa8Z6X9oJzSaUiLWrDA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=hDbpZijf/VnOIP5EHW5yX5vN+z8BWR+/QGOjMuYR5A8=;
 b=KX8+NIxq6gnqJkRdzfF9BznqwbCIKTwytoaRigi7LDRwL0686wYbwARvRl0+1ruLEW5lM5poNAcN5wYXHGbp9l73rTyzrbuab7/vWXZH+puZeAWWb0z0KlwNC97F6nTKJbW2Ve6eSyy2xXFculKbkm7VQopSJMaSXFUGtseO9hShH0A+W77yEuIirkcSlcseR3IPfR7FmdNtIJhcgbK6hBgHyvzsy5pz4lwNmHft5N4rK4A53SSoyp9aqvsMqdlxOJxeZdc61Kcf+QEBvfDmE+iBhwmSlWh25HlpjzBphEseGgRJ77N5qNtb+p+x2rhDfJ0aguAqhISARf+Dr6uH4A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=valinux.co.jp; dmarc=pass action=none
 header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=hDbpZijf/VnOIP5EHW5yX5vN+z8BWR+/QGOjMuYR5A8=;
 b=caTv2hyuepmzMXwZF/ygjt91bV/fQxXRSIWqR9aRcoxYSoS9et+wl2Y5na17T04qPAfp89UKlNAV3nKFhT8Jzg+059wiaccCShEwY0B3bmEWMsbAOy71+u6Sv6IArxX88D1+dpAnoYJFTsaSnqF/fYhq4m9oIXO/nteh1/9+os8=
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=valinux.co.jp;
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:24c::11)
 by OS9P286MB3865.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:2d2::12) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9366.17; Sun, 30 Nov
 2025 15:11:11 +0000
Received: from TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03]) by TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 ([fe80::fb7e:f4ed:a580:9d03%5]) with mapi id 15.20.9366.012; Sun, 30 Nov 2025
 15:11:11 +0000
From: Koichiro Den <den@valinux.co.jp>
To: ntb@lists.linux.dev,
	linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Frank.Li@nxp.com
Cc: jdmason@kudzu.us,
	dave.jiang@intel.com,
	allenbh@gmail.com,
	mani@kernel.org,
	kwilczynski@kernel.org,
	kishon@kernel.org,
	bhelgaas@google.com,
	jbrunet@baylibre.com,
	lpieralisi@kernel.org,
	yebin10@huawei.com,
	geert+renesas@glider.be,
	arnd@arndb.de,
	stable@vger.kernel.org
Subject: [PATCH v3 6/7] PCI: endpoint: pci-epf-vntb: Switch vpci_scan_bus() to use pci_scan_root_bus()
Date: Mon,  1 Dec 2025 00:10:59 +0900
Message-ID: <20251130151100.2591822-7-den@valinux.co.jp>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <20251130151100.2591822-1-den@valinux.co.jp>
References: <20251130151100.2591822-1-den@valinux.co.jp>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: TYCP286CA0091.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:2b4::13) To TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:400:24c::11)
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: TYWP286MB2697:EE_|OS9P286MB3865:EE_
X-MS-Office365-Filtering-Correlation-Id: d80120b7-9320-4bdd-c467-08de3022b25d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
	BCL:0;ARA:13230040|366016|7416014|376014|1800799024|10070799003;
X-Microsoft-Antispam-Message-Info:
	=?us-ascii?Q?GCrPNkUTwNTB7xJIxaufZ49G4Q3rnjFy8emE98kj1rCdHmZpoYmyZicSV7U7?=
 =?us-ascii?Q?iEiE/L3D4swHuY/or+3R/InBEfJvzVf0avcCDQHYjkuF7xfrNFCn27tR+XXX?=
 =?us-ascii?Q?tt8sdplOXm+0wGf1LTswE/f/aovxHBnx4EhwDi38apjlwdrvZiSMS/QmV3f8?=
 =?us-ascii?Q?Uvap3r/rpdUTjQ5EcnHjKWrCEewozZRf1QsKmjhRIaJIz4fDL6P8xvXAlX+z?=
 =?us-ascii?Q?XBiSOklp9syRrji/oMHXAVkX7msXpUm8j13DhtkziWG29fb/j5dwtmSZncSi?=
 =?us-ascii?Q?Q8nCD+mGzVdmKCuuafCpUbaXO9aYaxbKQ6xIzGru6t5yHtcGYqurzqAoXr39?=
 =?us-ascii?Q?H3fZG6WMRVVsBlhfVEkrjap1onG2WU4uvti7fVdBLeBp+OmJ5ALwOI/hLp4z?=
 =?us-ascii?Q?IXEz38nj5qr46ZRB0gohsvuSaYgt5BdOWZHjAXaNVTFVfMT4MDXNfq5mjpfo?=
 =?us-ascii?Q?LyW3oT1AeCjoNCIyG8YUws310colQySUCO0058R4wigiY3vO88cX1qb7JwH5?=
 =?us-ascii?Q?0Wbu9Ui4H2X2e6gd1qf/XzBBIooE5HesAfN8wwTR7hjDvTpe1+El0FBjjcNq?=
 =?us-ascii?Q?LxUs+GB2ijSS2Qw2ZzCjz93wMeewau5aJmcAnfTRqcSt2HPKQjN7QI2cjUHZ?=
 =?us-ascii?Q?kdJUAHqdCefnPhOXPgNw7YLpwVDN+wjgW+xSfSA/do+cTqkxE0AGJXW2ctH7?=
 =?us-ascii?Q?dd06VGzA/rEtw+H2DsTm7D1jP/ZBZ3p9I2eJtfRNPFkgWHn4yKDuQpDFjYq/?=
 =?us-ascii?Q?j0aD7p68hmVYnGCBKPUQpKmg6gWF1ZRwM1wMtB+5VHKVbEZDVIzKXemc2cGV?=
 =?us-ascii?Q?4sNDU1Dj61iUfb3WvsE+iQBwjlEG/O4lmoEl3A1pZ089jv3eF6Pxe2NISQxz?=
 =?us-ascii?Q?1FiI1hTlS7NzMfYa/bF7mr7AlXqHOWFUECaFl4I+JYEi8oNHTqTXHaYbqcmv?=
 =?us-ascii?Q?FhR4VFJcKryz47clhU871PHVrM/AaQ5ku6UC06ZeRLqVcqpr4+njskEJ61FR?=
 =?us-ascii?Q?nm6CACRQM0L2LBjFqPhUi7HnwIGbhB0hpNDjNPEZDTXFL5rLty9zEjQtbOB0?=
 =?us-ascii?Q?ZNcRy9l/z74ngd14ZPqQt+umuOKA9NrY1w9AoPnLOyHwAmh98LjaAjBE8eHg?=
 =?us-ascii?Q?yZoWTXsPTOy92ebXfQ/fXgFu0UwQogi8NA7jdY2MKKTJyCDWd4m5JojOkbEG?=
 =?us-ascii?Q?B4MEdNA8hupSLNRRe12r+Ax+wVU3vcHAwjXgbfjcwoon/GO/3qDDGheSnzx2?=
 =?us-ascii?Q?eohWyIykP1SmZ9lJ9E5ACZz0tk+A8LAt+lyTPcgNTGFZeLLzHp39b5fkW3kh?=
 =?us-ascii?Q?wGzbAtv8PlLFp98Gecn2Xubz5yijU1BW3BnH6GsrbhwzJoUlYKh4gJX76knc?=
 =?us-ascii?Q?Mm5vG3RGC+Szk9+mZBq0m3Kf39e39FBO3bq6sJB8AIV7BqRrNpvZLPoNXK0R?=
 =?us-ascii?Q?qu66ncl8hgcgw4iUB2kyZFunKPHXT7Ew?=
X-Forefront-Antispam-Report:
	CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(10070799003);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
	=?us-ascii?Q?UKu3IR2Ca5kp+mC0k/VtnhdnJdYuzCAzit7UEHhRoAIENVdziBKUWBFHLrs4?=
 =?us-ascii?Q?c8UNqTA5qXYtchZnVwQSi1753l0Quw9ZIrD4v8ttMK0Tk+8OooJf6vfP3OpH?=
 =?us-ascii?Q?OaOZdQIFPe8XdeSX/+0nNrHAKEVUcPEN3PnqSeXL6hQF4FysVQj0mA97s+Zp?=
 =?us-ascii?Q?F77FS5GpzwMAxHThokOJ1mig75SyolVfpoLXwp3kleAQyOr4fSCMWPrRaIRk?=
 =?us-ascii?Q?A+oZt5uMptUIQYjYuV4HBH6xIhzIMegRss4BUfljVSM0n7E6ycEvQpOAUdz7?=
 =?us-ascii?Q?mRWbzvCJIm+/N4xle+07UahvL1lEE2kI04tTf1kimSayx3ZKhh2OnXqQKTko?=
 =?us-ascii?Q?0gXfT6R8f5bRAijuoKyoNAaCtBV8GBhqx40wRBVg4GS5IPdNV7fKmdkqfETI?=
 =?us-ascii?Q?pMkLKNGgddRQElr4/CHfyVtbclG4lX8hSmjup0gMalAKWc2XTMxWw2Tfyb8P?=
 =?us-ascii?Q?qeYkZ/6DfZRjV1Ocbnx+Tq9DW9yOek5eaGhRV36aTCahXE6mD2ZRiRl3G2by?=
 =?us-ascii?Q?gTcLR07kqKNy5+q9M77vP7+vGFBlUfHb9OfuOJKcU63z7zBwb4NMLP/pDKok?=
 =?us-ascii?Q?lpcqtdFTXzW3DZENzyl45X1HEWzcYm5S3j7FtkhmFxx2NOWoQQt3aNj+aHQ+?=
 =?us-ascii?Q?q6TdbSxoorD12n9n89rK6kLbOufH7EqveeTzTCXMw8q61wGzog5K7DNflE30?=
 =?us-ascii?Q?hXVPXtCZ1nnBPJSpUaod2SIxXeT8kVX6iYW2MlAF/hi/1fpyvg3NPGie+Dg/?=
 =?us-ascii?Q?RAbKCx6BEfEICcd9vbB5n9MjJUTuBaa5Lc0lpFJXago+0TYoSFgpFHcvv2A3?=
 =?us-ascii?Q?DdgX9nydCl2PWAvLW73fZ7pdNuQP2uVcyKoqUTaWAbttxuF2Z2/Me4QL1T8r?=
 =?us-ascii?Q?+giCJNggd/VbIPPKq+KJdiV9NeuZirYe1fPu4cl0uGFKhZarNwmL+3F8uMgT?=
 =?us-ascii?Q?Z2QJHdrCDCtuK+SUA4Dd+L62LPuTFGRZoxP2GV9+7rngsbFSruPxd1/jR8jn?=
 =?us-ascii?Q?CByZqnnw3YnZivZnQ7qDo3N/1vqdUVnbIO6Q4TpSc5bAHQvRi2I1FjitJx4L?=
 =?us-ascii?Q?xPF3zgOXq2sEtVebf0zEjqV4JJiFzynA/WpMuVRHfY3jRj8NNBVLrmWzNSK+?=
 =?us-ascii?Q?B2LoMxse1XXEnGgphXApkR94c8NFCwiaMzMtoSTYLZYCbletFdJ7qXtSMxdk?=
 =?us-ascii?Q?kQblpI4IwQ+FhInuy4zG+Zz54yRnSkUpI6RkXPk8RWEC0ozDYw/dr6PDdaRd?=
 =?us-ascii?Q?cUfXs5RrGZ/lI7vPqoPbSd3Xoxnz4JM/lLJ+6xuT7sgLsP3Tpiq2YljlpzsV?=
 =?us-ascii?Q?ruNVingUQiDB7q24TadUEM+dYJwLhZ+6olGWewaQlgJ+wIkN7vCIm+G1KZJq?=
 =?us-ascii?Q?aSbuGEQgJ5AKWlC8sfADM9jX7g7vdnpG1ygcs/q5CDtYus0XEIA/LhporCfj?=
 =?us-ascii?Q?LUNf2Nc/fLWSNxC995DaS6uF0+BdT/W3qEvVICmn9OomDHxO8kYqcbN1leya?=
 =?us-ascii?Q?/8HnNbkUuguHyfCn434UZZs6O1Ha2KW1QIAyaGxn3XKpRqh4/zcxxlYTEc5y?=
 =?us-ascii?Q?BxZDOHfLNaP5B48ZBKH03mnDU3BhPk40EaKCUivFopDVQ3Ag/vcPyF10O4sG?=
 =?us-ascii?Q?/5QzcPoLTn0NCPRW+nJz4K8=3D?=
X-OriginatorOrg: valinux.co.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: d80120b7-9320-4bdd-c467-08de3022b25d
X-MS-Exchange-CrossTenant-AuthSource: TYWP286MB2697.JPNP286.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2025 15:11:11.3512
 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 7a57bee8-f73d-4c5f-a4f7-d72c91c8c111
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: xTBVZFYU4P2TaqH4etZQmY3gS5+MuQ95ZF01TFgkHn19xswlw+Lmy5tg65USMHZaU3Fvc3CfTMf/ECdsl+++Jw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9P286MB3865
X-DKIM: signer='valinux.co.jp' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: valinux.co.jp]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [213.196.21.55 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
SpamTally: Final spam score: 4

vpci_scan_bus() currently uses pci_scan_bus(), which creates a root bus
without a parent struct device. In a subsequent change we want to tear
down the virtual PCI root bus using pci_remove_root_bus(). For that to
work correctly, the root bus must be associated with a parent device,
similar to what the removed pci_scan_bus_parented() helper used to do.

Switch vpci_scan_bus() to use pci_scan_root_bus() and pass
&ndev->epf->epc->dev as the parent. Build the resource list in the same
way as pci_scan_bus(), so the behavior is unchanged except that the
virtual root bus now has a proper parent device. This avoids crashes in
the pci_epf_unbind() -> epf_ntb_unbind() -> pci_remove_root_bus() ->
pci_bus_release_domain_nr() path once we start removing the root bus in
a follow-up patch.

Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 drivers/pci/endpoint/functions/pci-epf-vntb.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index 750a246f79c9..af0651c03b20 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -1098,7 +1098,19 @@ static int vpci_scan_bus(void *sysdata)
 	struct pci_bus *vpci_bus;
 	struct epf_ntb *ndev = sysdata;
 
-	vpci_bus = pci_scan_bus(ndev->vbus_number, &vpci_ops, sysdata);
+	LIST_HEAD(resources);
+	static struct resource busn_res = {
+		.start = 0,
+		.end = 255,
+		.flags = IORESOURCE_BUS,
+	};
+
+	pci_add_resource(&resources, &ioport_resource);
+	pci_add_resource(&resources, &iomem_resource);
+	pci_add_resource(&resources, &busn_res);
+
+	vpci_bus = pci_scan_root_bus(&ndev->epf->epc->dev, ndev->vbus_number,
+				     &vpci_ops, sysdata, &resources);
 	if (!vpci_bus) {
 		pr_err("create pci bus failed\n");
 		return -EINVAL;
-- 
2.48.1



From - Sun Nov 30 15:13:15 2025
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-197677-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id wJYiGAdfLGnTOzIAYBR5ng
	(envelope-from <stable+bounces-197677-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Sun, 30 Nov 2025 15:13:11 +0000
Return-path: <stable+bounces-197677-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Sun, 30 Nov 2025 15:13:11 +0000
Received: from dfw.mirrors.kernel.org ([142.0.200.124])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-197677-hi=josie.lol@vger.kernel.org>)
	id 1vPj6t-0000000EHNH-09xw
	for hi@josie.lol;
	Sun, 30 Nov 2025 15:13:11 +0000
Received: from smtp.subspace.kernel.org (g = (weight_g * mg_per_g).round(1)\n        details = \"#{canonical} #{weight_g}g = #{caffeine_mg.to_i}mg\"","new_string":"        weight_g = dosage.rstrip(\"g\").to_f\n        caffeine_mg = (weight_g * mg_per_g).round(1)\n        weight_str = weight_g == weight_g.to_i ? weight_g.to_i.to_s : weight_g.to_s\n        details = \"#{canonical} #{weight_str}g = #{caffeine_mg.round.to_i}mg\""},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":521,"cache_read_input_tokens":82154,"output_tokens":330,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":521,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"}},"requestId":"req_011CYnBPzfDemjNvsav3s7ji","type":"assistant","uuid":"32532f0b-c37e-4734-bc3d-43061da03e8e","timestamp":"2026-03-06T16:57:30.669Z"}
{"parentUuid":"32532f0b-c37e-4734-bc3d-43061da03e8e","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PreToolUse","hookName":"PreToolUse:Edit","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pretooluse.py"},"toolUseID":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","parentToolUseID":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","uuid":"04288a74-6fe6-4d16-8eee-82b362872539","timestamp":"2026-03-06T16:57:30.724Z"}
{"parentUuid":"04288a74-6fe6-4d16-8eee-82b362872539","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:Edit","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.py"},"parentToolUseID":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","toolUseID":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","timestamp":"2026-03-06T16:57:33.355Z","uuid":"b6ca5cef-bfaa-473c-88b4-c288eae75fd7"}
{"parentUuid":"b6ca5cef-bfaa-473c-88b4-c288eae75fd7","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:Edit","command":"callback"},"parentToolUseID":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","toolUseID":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","timestamp":"2026-03-06T16:57:33.355Z","uuid":"2c3ded32-a9a0-46f4-adef-2b3dcb2ec6ea"}
{"parentUuid":"32532f0b-c37e-4734-bc3d-43061da03e8e","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01BdhTsjWtWQZKXNSCsNNWwr","type":"tool_result","content":"The file /home/josie/development/personal/josiedot/health/josie-health-lut/src/caffeine_lut.cr has been updated successfully."}]},"uuid":"ec1d78a9-9ac4-46bc-a061-082434948510","timestamp":"2026-03-06T16:57:33.354Z","toolUseResult":{"filePath":"/home/josie/development/personal/josiedot/health/josie-health-lut/src/caffeine_lut.cr","oldString":"        weight_g = dosage.rstrip(\"g\").to_f\n        caffeine_mg = (weight_g * mg_per_g).round(1)\n        details = \"#{canonical} #{weight_g}g = #{caffeine_mg.to_i}mg\"","newString":"        weight_g = dosage.rstrip(\"g\").to_f\n        caffeine_mg = (weight_g * mg_per_g).round(1)\n        weight_str = weight_g == weight_g.to_i ? weight_g.to_i.to_s : weight_g.to_s\n        details = \"#{canonical} #{weight_str}g = #{caffeine_mg.round.to_i}mg\"","originalFile":"require \"json\"\nrequire \"./data_files\"\n\nmodule JosieHealth::LUT\n  module CaffeineLUT\n    # Serving sizes in ml\n    SERVING_SIZES = {\n      \"can\"     => 355,\n      \"cans\"    => 355,\n      \"bottle\"  => 500,\n      \"bottles\" => 500,\n      \"cup\"     => 240,\n      \"cups\"    => 240,\n      \"mug\"     => 350,\n      \"mugs\"    => 350,\n      \"shot\"    => 30,\n      \"shots\"   => 30,\n    }\n\n    # Category defaults\n    CATEGORY_DEFAULTS = {\n      \"energy_drink\" => {caffeine_mg: 160, default_ml: 500},\n      \"energy_shot\"  => {caffeine_mg: 200, default_ml: 60},\n      \"coffee\"       => {caffeine_mg: 95, default_ml: 240},\n      \"tea\"          => {caffeine_mg: 50, default_ml: 240},\n      \"soda\"         => {caffeine_mg: 40, default_ml: 355},\n    }\n\n    @@brands : Hash(String, NamedTuple(caffeine_mg: Int32, category: String, default_ml: Int32))?\n    @@powder_data : Hash(String, Int32)?\n    @@alias_map : Hash(String, String)?\n    @@loaded = false\n\n    # Load caffeine data from embedded JSON\n    def self.load_data\n      return if @@loaded\n\n      begin\n        json = DataFiles.caffeine\n\n        @@brands = {} of String => NamedTuple(caffeine_mg: Int32, category: String, default_ml: Int32)\n        @@powder_data = {} of String => Int32\n        @@alias_map = {} of String => String\n\n        if brands_json = json[\"brands\"]?\n          brands_json.as_h.each do |name, data|\n            canonical_name = name.to_s\n            @@brands.not_nil![canonical_name] = {\n              caffeine_mg: data[\"caffeine_mg\"].as_i,\n              category:    data[\"category\"].as_s,\n              default_ml:  data[\"default_ml\"].as_i,\n            }\n\n            if mg_per_g = data[\"caffeine_mg_per_g\"]?\n              @@powder_data.not_nil![canonical_name] = mg_per_g.as_i\n            end\n\n            # Register aliases\n            if aliases = data[\"aliases\"]?\n              aliases.as_a.each do |alias_name|\n                @@alias_map.not_nil![alias_name.as_s] = canonical_name\n              end\n            end\n          end\n        end\n\n        puts \"Loaded #{@@brands.not_nil!.size} caffeine brands with #{@@alias_map.not_nil!.size} aliases\"\n        @@loaded = true\n      rescue ex\n        puts \"Error loading caffeine.json: #{ex.message}\"\n        @@brands = {} of String => NamedTuple(caffeine_mg: Int32, category: String, default_ml: Int32)\n        @@powder_data = {} of String => Int32\n        @@alias_map = {} of String => String\n        @@loaded = true\n      end\n    end\n\n    # Resolve alias to canonical name\n    def self.resolve_alias(name : String) : String\n      load_data\n      normalized = name.downcase.gsub(/[\\s\\-_]/, \"\")\n      @@alias_map.not_nil![normalized]? || normalized\n    end\n\n    # Lookup a brand by name (handles aliases)\n    def self.lookup_brand(name : String) : NamedTuple(caffeine_mg: Int32, category: String, default_ml: Int32)?\n      load_data\n      canonical = resolve_alias(name)\n      @@brands.not_nil![canonical]?\n    end\n\n    # Check if a substance is a caffeinated beverage/product\n    def self.is_caffeine_source?(name : String) : Bool\n      lookup_brand(name) != nil\n    end\n\n    # Lookup caffeine mg per gram for powder sources (e.g., matcha)\n    def self.lookup_powder_mg_per_g(name : String) : Int32?\n      load_data\n      canonical = resolve_alias(name)\n      @@powder_data.not_nil![canonical]?\n    end\n\n    # Get category defaults\n    def self.get_category_defaults(category : String) : NamedTuple(caffeine_mg: Int32, default_ml: Int32)?\n      CATEGORY_DEFAULTS[category.downcase]?\n    end\n\n    # Calculate caffeine mg from volume and brand info\n    def self.calculate_mg(volume_ml : Float64, caffeine_per_serving : Int32, serving_ml : Int32) : Float64\n      ((volume_ml / serving_ml) * caffeine_per_serving).round(1)\n    end\n\n    # Parse dosage string like \"2cans\", \"500ml\", \"1cup\", \"2g\"\n    # Returns {count, serving_type, volume_ml} or nil if not parseable\n    # Note: for \"g\" serving, count is truncated to Int32; use the original dosage string for precise weight\n    def self.parse_dosage(dosage : String) : NamedTuple(count: Int32, serving: String?, volume_ml: Int32)?\n      normalized = dosage.downcase.strip\n\n      # Try to match \"Nunit\" pattern (e.g., \"2cans\", \"1cup\", \"500ml\")\n      if match = normalized.match(/^(\\d+(?:\\.\\d+)?)(ml|g|can|cans|bottle|bottles|cup|cups|mug|mugs|shot|shots)?$/)\n        count_str = match[1]\n        serving = match[2]?\n\n        # Handle decimal counts\n        count_f = count_str.to_f\n        count = count_f.to_i\n\n        if serving == \"ml\"\n          # Direct ml specification\n          return {count: 1, serving: \"ml\", volume_ml: count_f.to_i}\n        elsif serving == \"g\"\n          # Gram specification for powder sources\n          return {count: count_f.to_i, serving: \"g\", volume_ml: 0}\n        elsif serving && SERVING_SIZES.has_key?(serving)\n          volume_ml = SERVING_SIZES[serving] * count\n          return {count: count, serving: serving, volume_ml: volume_ml}\n        elsif serving.nil?\n          # Just a number, assume count of default serving\n          return {count: count, serving: nil, volume_ml: 0}\n        end\n      end\n\n      nil\n    end\n\n    # Full caffeine dose calculation\n    # Input: dosage string, substance name\n    # Returns: {caffeine_mg, annotation} or nil\n    def self.calculate_dose(dosage : String, substance : String) : NamedTuple(caffeine_mg: Float64, annotation: String)?\n      parsed = parse_dosage(dosage)\n      return nil unless parsed\n\n      brand_info = lookup_brand(substance)\n      return nil unless brand_info\n\n      canonical = resolve_alias(substance)\n\n      # Gram-based calculation for powder sources\n      if parsed[:serving] == \"g\"\n        mg_per_g = lookup_powder_mg_per_g(substance)\n        return nil unless mg_per_g\n        weight_g = dosage.rstrip(\"g\").to_f\n        caffeine_mg = (weight_g * mg_per_g).round(1)\n        details = \"#{canonical} #{weight_g}g = #{caffeine_mg.to_i}mg\"\n        return {caffeine_mg: caffeine_mg, annotation: details}\n      end\n\n      # Determine volume\n      volume_ml = if parsed[:volume_ml] > 0\n                    parsed[:volume_ml]\n                  else\n                    parsed[:count] * brand_info[:default_ml]\n                  end\n\n      caffeine_mg = calculate_mg(volume_ml.to_f, brand_info[:caffeine_mg], brand_info[:default_ml])\n\n      # Build details string\n      serving_str = parsed[:serving] ? \"#{parsed[:count]}#{parsed[:serving]}\" : parsed[:count].to_s\n      details = \"#{canonical} #{serving_str} (#{volume_ml}ml) = #{caffeine_mg.to_i}mg\"\n\n      {caffeine_mg: caffeine_mg, annotation: details}\n    end\n\n    # Get all brand names\n    def self.all_brands : Array(String)\n      load_data\n      @@brands.not_nil!.keys\n    end\n  end\nend\n","structuredPatch":[{"oldStart":162,"oldLines":7,"newStart":162,"newLines":8,"lines":["         return nil unless mg_per_g","         weight_g = dosage.rstrip(\"g\").to_f","         caffeine_mg = (weight_g * mg_per_g).round(1)","-        details = \"#{canonical} #{weight_g}g = #{caffeine_mg.to_i}mg\"","+        weight_str = weight_g == weight_g.to_i ? weight_g.to_i.to_s : weight_g.to_s","+        details = \"#{canonical} #{weight_str}g = #{caffeine_mg.round.to_i}mg\"","         return {caffeine_mg: caffeine_mg, annotation: details}","       end"," "]}],"userModified":false,"replaceAll":false},"sourceToolAssistantUUID":"32532f0b-c37e-4734-bc3d-43061da03e8e"}
{"parentUuid":"ec1d78a9-9ac4-46bc-a061-082434948510","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","message":{"model":"claude-opus-4-6","id":"msg_01RZkYwKktA4JN4SCECEeHrM","type":"message","role":"assistant","content":[{"type":"text","text":"Same fixes in log_handler.cr:"}],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":381,"cache_read_input_tokens":82675,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":381},"output_tokens":1,"service_tier":"standard","inference_geo":"not_available"}},"requestId":"req_011CYnBRGZiEoc2w4D8sHtnH","type":"assistant","uuid":"eb1eae45-3023-482e-8f66-feea2769bcbd","timestamp":"2026-03-06T16:57:47.066Z"}
{"parentUuid":"eb1eae45-3023-482e-8f66-feea2769bcbd","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","message":{"model":"claude-opus-4-6","id":"msg_01RZkYwKktA4JN4SCECEeHrM","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01Egp35di6GZvGB81qWwHCGa","name":"Read","input":{"file_path":"/home/josie/development/personal/josiedot/health/services/core/src/handlers/log_handler.cr","offset":1133,"limit":15},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":381,"cache_read_input_tokens":82675,"output_tokens":126,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":381,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"}},"requestId":"req_011CYnBRGZiEoc2w4D8sHtnH","type":"assistant","uuid":"a267c77f-1753-452c-8498-024145c1636c","timestamp":"2026-03-06T16:57:47.728Z"}
{"parentUuid":"a267c77f-1753-452c-8498-024145c1636c","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PreToolUse","hookName":"PreToolUse:Read","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pretooluse.py"},"toolUseID":"toolu_01Egp35di6GZvGB81qWwHCGa","parentToolUseID":"toolu_01Egp35di6GZvGB81qWwHCGa","uuid":"b07b807f-c07c-433f-a492-a5d3531148de","timestamp":"2026-03-06T16:57:47.729Z"}
{"parentUuid":"b07b807f-c07c-433f-a492-a5d3531148de","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:Read","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.py"},"parentToolUseID":"toolu_01Egp35di6GZvGB81qWwHCGa","toolUseID":"toolu_01Egp35di6GZvGB81qWwHCGa","timestamp":"2026-03-06T16:57:47.859Z","uuid":"1e1388bc-e117-441c-9277-814d42814137"}
{"parentUuid":"1e1388bc-e117-441c-9277-814d42814137","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:Read","command":"callback"},"parentToolUseID":"toolu_01Egp35di6GZvGB81qWwHCGa","toolUseID":"toolu_01Egp35di6GZvGB81qWwHCGa","timestamp":"2026-03-06T16:57:47.860Z","uuid":"1858fcc4-f837-4cb8-8b65-2bace8a4a236"}
{"parentUuid":"a267c77f-1753-452c-8498-024145c1636c","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01Egp35di6GZvGB81qWwHCGa","type":"tool_result","content":"  1133→        return nil\n  1134→      end\n  1135→    end\n  1136→\n  1137→    # Gram-based calculation for powder sources\n  1138→    if parsed[:serving] == \"g\"\n  1139→      mg_per_g = JosieHealth::LUT.lookup_caffeine_powder_mg_per_g(substance_name)\n  1140→      return nil unless mg_per_g\n  1141→      weight_g = effective_dosage.rstrip(\"g\").to_f\n  1142→      caffeine_mg = (weight_g * mg_per_g).round(1)\n  1143→      details = \"#{substance_name} #{weight_g}g = #{caffeine_mg.to_i}mg\"\n  1144→      return {mg: caffeine_mg, details: details}\n  1145→    end\n  1146→\n  1147→    # Determine volume"}]},"uuid":"404650a7-2684-4191-adb4-1731f3749b1d","timestamp":"2026-03-06T16:57:47.858Z","toolUseResult":{"type":"text","file":{"filePath":"/home/josie/development/personal/josiedot/health/services/core/src/handlers/log_handler.cr","content":"        return nil\n      end\n    end\n\n    # Gram-based calculation for powder sources\n    if parsed[:serving] == \"g\"\n      mg_per_g = JosieHealth::LUT.lookup_caffeine_powder_mg_per_g(substance_name)\n      return nil unless mg_per_g\n      weight_g = effective_dosage.rstrip(\"g\").to_f\n      caffeine_mg = (weight_g * mg_per_g).round(1)\n      details = \"#{substance_name} #{weight_g}g = #{caffeine_mg.to_i}mg\"\n      return {mg: caffeine_mg, details: details}\n    end\n\n    # Determine volume","numLines":15,"startLine":1133,"totalLines":1461}},"sourceToolAssistantUUID":"a267c77f-1753-452c-8498-024145c1636c"}
{"parentUuid":"404650a7-2684-4191-adb4-1731f3749b1d","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","message":{"model":"claude-opus-4-6","id":"msg_018nL6aE1sV4e2QGAsH6K2MD","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_0123qWTehFn87wNo9K2zwz6m","name":"Edit","input":{"replace_all":false,"file_path":"/home/josie/development/personal/josiedot/health/services/core/src/handlers/log_handler.cr","old_string":"      weight_g = effective_dosage.rstrip(\"g\").to_f\n      caffeine_mg = (weight_g * mg_per_g).round(1)\n      details = \"#{substance_name} #{weight_g}g = #{caffeine_mg.to_i}mg\"","new_string":"      weight_g = effective_dosage.rstrip(\"g\").to_f\n      caffeine_mg = (weight_g * mg_per_g).round(1)\n      weight_str = weight_g == weight_g.to_i ? weight_g.to_i.to_s : weight_g.to_s\n      details = \"#{substance_name} #{weight_str}g = #{caffeine_mg.round.to_i}mg\""},"caller":{"type":"direct"}}],"stop_reason":"tool_use","stop_sequence":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":368,"cache_read_input_tokens":83056,"output_tokens":313,"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":368,"ephemeral_5m_input_tokens":0},"inference_geo":"","iterations":[],"speed":"standard"}},"requestId":"req_011CYnBSLTeFHKT7TsWV913o","type":"assistant","uuid":"a4ccc402-fe7a-482c-90d9-cb8415e2cacb","timestamp":"2026-03-06T16:57:58.786Z"}
{"parentUuid":"a4ccc402-fe7a-482c-90d9-cb8415e2cacb","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PreToolUse","hookName":"PreToolUse:Edit","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/pretooluse.py"},"toolUseID":"toolu_0123qWTehFn87wNo9K2zwz6m","parentToolUseID":"toolu_0123qWTehFn87wNo9K2zwz6m","uuid":"2b6e3c61-f3dd-4795-b118-1f860540df7c","timestamp":"2026-03-06T16:57:58.846Z"}
{"parentUuid":"2b6e3c61-f3dd-4795-b118-1f860540df7c","isSidechain":false,"userType":"external","cwd":"/home/josie/development/personal/josiedot/health/josie-health-lut","sessionId":"c4d8f374-35db-4e07-bbbd-c0355c388244","version":"2.1.70","gitBranch":"main","slug":"melodic-popping-thacker","type":"progress","data":{"type":"hook_progress","hookEvent":"PostToolUse","hookName":"PostToolUse:Edit","command":"python3 ${CLAUDE_PLUGIN_ROOT}/hooks/posttooluse.py"},"parentToolUseID":"toolu_0123qWTehFn87wNo9K2zwz6m","toolUseID":"toolu_0123qWTehFn87wNo9K2zwz6m06dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:35.658] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:35.658] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:35.658] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:57.360] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:57.361] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:57.361] [warn]  The resource https://discord.com/assets/cb2006dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:57.361] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:57.361] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:28:57.361] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:29:25.542] [info]  [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = false
[2026-03-06 18:29:42.459] [info]  [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = true
[2026-03-06 18:29:45.630] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:29:45.630] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:29:45.630] [warn]  The resource https://discord.com/assets/cb2006dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:29:45.630] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:29:45.630] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:29:45.630] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:13.542] [info]  [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = false
[2026-03-06 18:30:13.675] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:13.676] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:13.676] [warn]  The resource https://discord.com/assets/cb2006dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:13.676] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:13.676] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:13.676] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:26.345] [info]  [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = true
[2026-03-06 18:30:29.502] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:29.503] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:29.503] [warn]  The resource https://discord.com/assets/cb2006dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:29.503] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:29.504] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:29.504] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:48.001] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:48.002] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:48.002] [warn]  The resource https://discord.com/assets/cb2006dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:48.002] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:48.002] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:30:48.002] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:15.544] [info]  [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = false
[2026-03-06 18:31:28.531] [info]  [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = true
[2026-03-06 18:31:31.715] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:31.715] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:31.715] [warn]  The resource https://discord.com/assets/cb2006dbced0e246.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:31.715] [warn]  The resource https://discord.com/assets/7a6a566c2e88a35d.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:31.715] [warn]  The resource https://discord.com/assets/e52f0cba712e2fb4.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:31.716] [warn]  The resource https://discord.com/assets/dd24010f3cf7def7.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:48.239] [warn]  The resource https://discord.com/assets/189422196a4f8b53.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[2026-03-06 18:31:48.240] [warn]  The resource https://discord.com/assets/ce3b8055f5114434.woff2 was preloaded using link preload but not used within a few seconds from the wom - Thu Jan 15 17:53:06 2026
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-209602-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id 8DRJFH0paWmNYB0AYBR5ng
	(envelope-from <stable+bounces-209602-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:53:01 +0000
Return-path: <stable+bounces-209602-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Thu, 15 Jan 2026 17:53:01 +0000
Received: from tor.lore.kernel.org ([172.105.105.114])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-209602-hi=josie.lol@vger.kernel.org>)
	id 1vgRWn-00000008HB9-0gPY
	for hi@josie.lol;
	Thu, 15 Jan 2026 17:53:01 +0000
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id A775F30A9E9C
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:46:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A69D3BFE47;
	Thu, 15 Jan 2026 17:46:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="J4mkDEYe"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A5A03BFE5F;
	Thu, 15 Jan 2026 17:46:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1768499164; cv=none; b=TXzsKOE0LjdDu4UZEfT81ZOQf9cPBRQ9OjFWkgShqtBDmwiLKNZPMEpSJ5IpRxyoXzGjahmK58390Mf4oyoPEmXZMECwEPA0bZkR9KV5pKdbzRDg7aopR8ZEcVUvpfeZEX3AaM1fWLDmrGW26Fvfrb8UtDSvxrNqBVI2lxjwA04=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1768499164; c=relaxed/simple;
	bh=Qp7NBGPs6IsJPeEAISnh2LK9QXV2BhX7e+ub5IFyUGA=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=N1FBPRXRM5V2mo0lcnH5sMSX//X+vnzK0AoljBq4Es3YJgsUeVziznwFoDHh9nvdieEWYMMI4w6I7mt+vfKVftFUJnh1xRP/R5dNdMagU2GFh2LhyoyOk5VRq0BqaNLVeIbzJh4AoFKbk8+hX9DoA240s6IAnhRX3+FBQFypnV8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=J4mkDEYe; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89C09C16AAE;
	Thu, 15 Jan 2026 17:46:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
	s=korg; t=1768499163;
	bh=Qp7NBGPs6IsJPeEAISnh2LK9QXV2BhX7e+ub5IFyUGA=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=J4mkDEYeOSy8IiKXvZdKjJNd5N8J0ipP8feUVgWV1bj3GTrZOgJ+AOfXlr3ye9bnl
	 QjeWQWvy+6ShlCczoV7MDoE8nByBDK5MlOlwrayEaF94SGSv/RkXY76IgJmKQIZMi+
	 wMj/Ev4u3T71MaFiVoyGHIEXx6qidBRl3Ux2/9BQ=
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Haotian Zhang <vulab@iscas.ac.cn>,
	Lee Jones <lee@kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10 087/451] mfd: mt6358-irq: Fix missing irq_domain_remove() in error path
Date: Thu, 15 Jan 2026 17:44:48 +0100
Message-ID: <20260115164234.064237062@linuxfoundation.org>
X-Mailer: git-send-email 2.52.0
In-Reply-To: <20260115164230.864985076@linuxfoundation.org>
References: <20260115164230.864985076@linuxfoundation.org>
User-Agent: quilt/0.69
X-stable: review
X-Patchwork-Hint: ignore
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-DKIM: signer='linuxfoundation.org' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: linuxfoundation.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
 -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender
SpamTally: Final spam score: 4

5.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Haotian Zhang <vulab@iscas.ac.cn>

[ Upstream commit 384bd58bf7095e4c4c8fcdbcede316ef342c630c ]

If devm_request_threaded_irq() fails after irq_domain_add_linear()
succeeds in mt6358_irq_init(), the function returns without removing
the created IRQ domain, leading to a resource leak.

Call irq_domain_remove() in the error path after a successful
irq_domain_add_linear() to properly release the IRQ domain.

Fixes: 2b91c28f2abd ("mfd: Add support for the MediaTek MT6358 PMIC")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251118121427.583-1-vulab@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/mfd/mt6358-irq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c
index db734f2831ff0..db89da7b98f1d 100644
--- a/drivers/mfd/mt6358-irq.c
+++ b/drivers/mfd/mt6358-irq.c
@@ -227,6 +227,7 @@ int mt6358_irq_init(struct mt6397_chip *chip)
 	if (ret) {
 		dev_err(chip->dev, "Failed to register IRQ=%d, ret=%d\n",
 			chip->irq, ret);
+		irq_domain_remove(chip->irq_domain);
 		return ret;
 	}
 
-- 
2.51.0





From - Thu Jan 15 17:53:09 2026
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-209606-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id cBHuF4ApaWm7whwAYBR5ng
	(envelope-from <stable+bounces-209606-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:53:04 +0000
Return-path: <stable+bounces-209606-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Thu, 15 Jan 2026 17:53:04 +0000
Received: from tor.lore.kernel.org ([172.105.105.114])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-209606-hi=josie.lol@vger.kernel.org>)
	id 1vgRWq-00000008HM3-0uOL
	for hi@josie.lol;
	Thu, 15 Jan 2026 17:53:04 +0000
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id 4509F30ACCEE
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:46:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C6E83BFE53;
	Thu, 15 Jan 2026 17:46:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YQhs7bYZ"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59B3E3BFE29;
	Thu, 15 Jan 2026 17:46:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1768499175; cv=none; b=EeFTvi4jIiTeVx7auh9/m7EZR6RglBoqFGE8yINv9RhZww83Suy16n6JbWX8+AgiJ047IltiZpFYoZKq/YExCbLoYHhmFplYUCo4TbHnO82NzA9DftWXgWBDRf0o23tI2YMEgo5a6lq3FQ0ZvkLVDuLjkx+l8ZfKGTHnU0erpRE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1768499175; c=relaxed/simple;
	bh=A0d45ukhUGFRENsVTGpxXBC+mYhb3OU2YcXI4ZCsSQc=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=TKZoKetuLVwiuwTR994uuq6iL/BAsLn43VqbHpZKRedSMS6HHTtlt9lw/Jra53rg8iyw4jegzhUZ7G74iNktkfQjOKyv21eBm28We2EeS4urxzoJKgJVdA/opHzbnlbnRTdiviL/LYsf4O1ibPqwQxdvB0kea9jeBdlz6sklDyo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YQhs7bYZ; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA2A3C116D0;
	Thu, 15 Jan 2026 17:46:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
	s=korg; t=1768499175;
	bh=A0d45ukhUGFRENsVTGpxXBC+mYhb3OU2YcXI4ZCsSQc=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=YQhs7bYZgC00h0Cw7kdEaJU16axKLE2MVqcrSjEcItHeRI7EEXDT42RRxZ5u3MCyg
	 c+1rAVGkUDS0yO6koQTe+Iow8Mi3Oqg600FZZYG+c8F7gzvcuAGud4nMsJOLtCBtRs
	 3UKu7CnqiIyJbuyvlvZj75FGJsYWFghHJI5ncwZ0=
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Shengjiu Wang <shengjiu.wang@nxp.com>,
	Mark Brown <broonie@kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10 135/451] ASoC: ak4458: Disable regulator when error happens
Date: Thu, 15 Jan 2026 17:45:36 +0100
Message-ID: <20260115164235.804425254@linuxfoundation.org>
X-Mailer: git-send-email 2.52.0
In-Reply-To: <20260115164230.864985076@linuxfoundation.org>
References: <20260115164230.864985076@linuxfoundation.org>
User-Agent: quilt/0.69
X-stable: review
X-Patchwork-Hint: ignore
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-DKIM: signer='linuxfoundation.org' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: msgid.link]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [172.105.105.114 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
 -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender
SpamTally: Final spam score: 4

5.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shengjiu Wang <shengjiu.wang@nxp.com>

[ Upstream commit ae585fabb9713a43e358cf606451386757225c95 ]

Disable regulator in runtime resume when error happens to balance
the reference count of regulator.

Fixes: 7e3096e8f823 ("ASoC: ak4458: Add regulator support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251203100529.3841203-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/codecs/ak4458.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index 85a1d00894a9c..af4873c97d3aa 100644
--- a/sound/soc/codecs/ak4458.c
+++ b/sound/soc/codecs/ak4458.c
@@ -683,7 +683,15 @@ static int __maybe_unused ak4458_runtime_resume(struct device *dev)
 	regcache_cache_only(ak4458->regmap, false);
 	regcache_mark_dirty(ak4458->regmap);
 
-	return regcache_sync(ak4458->regmap);
+	ret = regcache_sync(ak4458->regmap);
+	if (ret)
+		goto err;
+
+	return 0;
+err:
+	regcache_cache_only(ak4458->regmap, true);
+	regulator_bulk_disable(ARRAY_SIZE(ak4458->supplies), ak4458->supplies);
+	return ret;
 }
 #endif /* CONFIG_PM */
 
-- 
2.51.0





From - Thu Jan 15 17:53:23 2026
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-209609-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id 4FC4EY8paWnG/RsAYBR5ng
	(envelope-from <stable+bounces-209609-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:53:19 +0000
Return-path: <stable+bounces-209609-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Thu, 15 Jan 2026 17:53:19 +0000
Received: from tor.lore.kernel.org ([172.105.105.114])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-209609-hi=josie.lol@vger.kernel.org>)
	id 1vgRX5-00000008HpT-0PXC
	for hi@josie.lol;
	Thu, 15 Jan 2026 17:53:19 +0000
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id DF14630B9347
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:46:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id E4F503BFE42;
	Thu, 15 Jan 2026 17:46:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EYLIn4LT"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C22763BF30A;
	Thu, 15 Jan 2026 17:46:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1768499183; cv=none; b=AWgurzD1G38iDxflvShE2GPB801cquz6JUW5F/cCyQf2DdIEpfh8kI/OUfvG2pojIAsq0o6hYQNVn1lNlOWJeXOdAcFoRg/AXCAtAJ5uxylRAwwLHIMEyTzZNjSzpUGPJgiJJQ25j00xRhDG2RP1lUN8E5L33FEGy1OoDTgCAN4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1768499183; c=relaxed/simple;
	bh=ujs+g/royXtupfMHhdJ6ZKOHUuEeA/SUZ+4i3/kitHI=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=AUN1EkwA0Jo2VKlEsa6Y2H8LPfPjoEvS7ki0/Zy5Z7jx6cuB19svU4YR2k7xU08rOArHAdmiVQd7Oxl49GiHQ+eYXKZ1ATZ0+vmrzTordiyWQAxP26EQspwWWLOZ68enLOR5yjjOoVfbvupvd0USMbXJexaiTSgFVPYPYw3OuNM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EYLIn4LT; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51CC1C116D0;
	Thu, 15 Jan 2026 17:46:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
	s=korg; t=1768499183;
	bh=ujs+g/royXtupfMHhdJ6ZKOHUuEeA/SUZ+4i3/kitHI=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=EYLIn4LTJIxRypxf36GhImVTd3DsIG4Rmf0PrUyHdO8GSFqj+dFrsXli0js+NVbIE
	 440fsYrsWkYO/FAN/sBcCCDftHMqx626QV+4Zgm7KObT1/JzQx6tEYWB1LUPF3/FQ/
	 /xKqocYM+duBH1guS3cyNlyA31HrPAaA7tfkZVG8=
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	shechenglong <shechenglong@xfusion.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	Jens Axboe <axboe@kernel.dk>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10 138/451] block: fix comment for op_is_zone_mgmt() to include RESET_ALL
Date: Thu, 15 Jan 2026 17:45:39 +0100
Message-ID: <20260115164235.910414091@linuxfoundation.org>
X-Mailer: git-send-email 2.52.0
In-Reply-To: <20260115164230.864985076@linuxfoundation.org>
References: <20260115164230.864985076@linuxfoundation.org>
User-Agent: quilt/0.69
X-stable: review
X-Patchwork-Hint: ignore
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-DKIM: signer='linuxfoundation.org' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: linuxfoundation.org]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [172.105.105.114 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
 -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender
SpamTally: Final spam score: 4

5.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: shechenglong <shechenglong@xfusion.com>

[ Upstream commit 8a32282175c964eb15638e8dfe199fc13c060f67 ]

REQ_OP_ZONE_RESET_ALL is a zone management request, and op_is_zone_mgmt()
has returned true for it.

Update the comment to remove the misleading exception note so
the documentation matches the implementation.

Fixes: 12a1c9353c47 ("block: fix op_is_zone_mgmt() to handle REQ_OP_ZONE_RESET_ALL")
Signed-off-by: shechenglong <shechenglong@xfusion.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/blk_types.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 40839ae52f61e..11c03df4709f4 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -487,10 +487,7 @@ static inline bool op_is_discard(unsigned int op)
 }
 
 /*
- * Check if a bio or request operation is a zone management operation, with
- * the exception of REQ_OP_ZONE_RESET_ALL which is treated as a special case
- * due to its different handling in the block layer and device response in
- * case of command failure.
+ * Check if a bio or request operation is a zone management operation.
  */
 static inline bool op_is_zone_mgmt(enum req_opf op)
 {
-- 
2.51.0





From - Thu Jan 15 17:53:28 2026
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-209614-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id UGMCLJEpaWk1hxYAYBR5ng
	(envelope-from <stable+bounces-209614-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:53:21 +0000
Return-path: <stable+bounces-209614-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Thu, 15 Jan 2026 17:53:21 +0000
Received: from tor.lore.kernel.org ([172.105.105.114])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-209614-hi=josie.lol@vger.kernel.org>)
	id 1vgRX7-00000008HuL-25RR
	for hi@josie.lol;
	Thu, 15 Jan 2026 17:53:21 +0000
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id 0944530DD2BD
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:47:04 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AFCF3BF30E;
	Thu, 15 Jan 2026 17:46:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GDEUDy87"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27F233BF2FA;
	Thu, 15 Jan 2026 17:46:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1768499198; cv=none; b=fDOFvTCjLAyn8piaGx03VIahrKZbLPS0fMVAAqVbFoI7MCi8pklvCCXqBuuBopYrhOIJ+jHMEobuPHui4mAOraSZzemluUA4VaGZYdFoOOOXisVYBIEne+J9CE4U5vfER2G3OEgAVmmLTdRvQEu+G4UiUllqSpoW3cRswCg5W/c=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1768499198; c=relaxed/simple;
	bh=RMqGM5QFrDUmmp4Vem1Af3IksCMqQvbFW3QQNqr1Y70=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version:Content-Type; b=VPD1lzf9H9aCyL6AJO7bWLo6D67o1da6uAdNF8djT+g5/WJZ1G/bnwFzwobe7cZu+d/zlwKVavye2D9RW+lTlSAxb4sal54MhhR1sYNBfar2pnt+oXekncYcSWKB08QCSFRc7Pq92m6ATfdj/zeQ74zf1HXOqQ/O3hy3z8mz2VI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GDEUDy87; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA999C16AAE;
	Thu, 15 Jan 2026 17:46:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
	s=korg; t=1768499198;
	bh=RMqGM5QFrDUmmp4Vem1Af3IksCMqQvbFW3QQNqr1Y70=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=GDEUDy87T5jeITqGnR1y4UBDJhP+L9CEPnuJBiAAWMKhEmEPzVpfOhrpkQNjB2Re1
	 yYKGiA3jGgQGJy8jLK9yNYROP/xmQQ5CIRJB0cW2ntus1Yl/BUXbWAD/pKDhUy/mGW
	 UnahS86vlZjj1BHWT1kURYronUVR4RNuPkOo45ks=
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Armin Wolf <W_Armin@gmx.de>,
	=?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10 125/451] fs/nls: Fix utf16 to utf8 conversion
Date: Thu, 15 Jan 2026 17:45:26 +0100
Message-ID: <20260115164235.444225862@linuxfoundation.org>
X-Mailer: git-send-email 2.52.0
In-Reply-To: <20260115164230.864985076@linuxfoundation.org>
References: <20260115164230.864985076@linuxfoundation.org>
User-Agent: quilt/0.69
X-stable: review
X-Patchwork-Hint: ignore
Precedence: bulk
X-Mailing-List: stable@vger.kernel.org
List-Id: <stable.vger.kernel.org>
List-Subscribe: <mailto:stable+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:stable+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-DKIM: signer='linuxfoundation.org' status='pass' reason=''
DKIMCheck: Server passes DKIM test, 0 Spam score
X-Spam-Score: 0.4 (/)
X-Spam-Report: Spam detection software, running on the system "witcher.mxrouting.net", has
 performed the tests listed below against this email.
 Information: https://mxroutedocs.com/directadmin/spamfilters/
 ---
 Content analysis details:   (0.4 points)
 ---
  pts rule name              description
 ---- ---------------------- -----------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: linuxfoundation.org]
  0.0 RCVD_IN_DNSWL_BLOCKED  RBL: ADMINISTRATOR NOTICE: The query to
                             DNSWL was blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block
                              for more information.
                             [172.105.105.114 listed in list.dnswl.org]
  1.5 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
                             valid
 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from
                             author's domain
 -0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
 -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender
SpamTally: Final spam score: 4

5.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Armin Wolf <W_Armin@gmx.de>

[ Upstream commit 25524b6190295577e4918c689644451365e6466d ]

Currently the function responsible for converting between utf16 and
utf8 strings will ignore any characters that cannot be converted. This
however also includes multi-byte characters that do not fit into the
provided string buffer.

This can cause problems if such a multi-byte character is followed by
a single-byte character. In such a case the multi-byte character might
be ignored when the provided string buffer is too small, but the
single-byte character might fit and is thus still copied into the
resulting string.

Fix this by stop filling the provided string buffer once a character
does not fit. In order to be able to do this extend utf32_to_utf8()
to return useful errno codes instead of -1.

Fixes: 74675a58507e ("NLS: update handling of Unicode")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251111131125.3379-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nls/nls_base.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index a026dbd3593f6..7eacded3c17d1 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -94,7 +94,7 @@ int utf32_to_utf8(unicode_t u, u8 *s, int maxout)
 
 	l = u;
 	if (l > UNICODE_MAX || (l & SURROGATE_MASK) == SURROGATE_PAIR)
-		return -1;
+		return -EILSEQ;
 
 	nc = 0;
 	for (t = utf8_table; t->cmask && maxout; t++, maxout--) {
@@ -110,7 +110,7 @@ int utf32_to_utf8(unicode_t u, u8 *s, int maxout)
 			return nc;
 		}
 	}
-	return -1;
+	return -EOVERFLOW;
 }
 EXPORT_SYMBOL(utf32_to_utf8);
 
@@ -217,8 +217,16 @@ int utf16s_to_utf8s(const wchar_t *pwcs, int inlen, enum utf16_endian endian,
 				inlen--;
 			}
 			size = utf32_to_utf8(u, op, maxout);
-			if (size == -1) {
-				/* Ignore character and move on */
+			if (size < 0) {
+				if (size == -EILSEQ) {
+					/* Ignore character and move on */
+					continue;
+				}
+				/*
+				 * Stop filling the buffer with data once a character
+				 * does not fit anymore.
+				 */
+				break;
 			} else {
 				op += size;
 				maxout -= size;
-- 
2.51.0





From - Thu Jan 15 17:53:44 2026
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <stable+bounces-209140-hi=josie.lol@vger.kernel.org>
Delivered-To: hi@josie.lol
Received: from witcher.mxrouting.net
	by witcher.mxrouting.net with LMTP
	id wINFK6QpaWklKxwAYBR5ng
	(envelope-from <stable+bounces-209140-hi=josie.lol@vger.kernel.org>)
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:53:40 +0000
Return-path: <stable+bounces-209140-hi=josie.lol@vger.kernel.org>
Envelope-to: hi@josie.lol
Delivery-date: Thu, 15 Jan 2026 17:53:40 +0000
Received: from sin.lore.kernel.org ([104.64.211.4])
	by witcher.mxrouting.net with esmtps  (TLS1.3) tls TLS_AES_256_GCM_SHA384
	(Exim 4.98)
	(envelope-from <stable+bounces-209140-hi=josie.lol@vger.kernel.org>)
	id 1vgRXP-00000008IOj-3JU5
	for hi@josie.lol;
	Thu, 15 Jan 2026 17:53:40 +0000
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sin.lore.kernel.org (Postfix) with ESMTP id E09F430B27AE
	for <hi@josie.lol>; Thu, 15 Jan 2026 17:24:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A39BD399011;
	Thu, 15 Jan 2026 17:24:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WzHhClQs"
X-Original-To: stable@vger.kernel.org
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80B312D9494;
	Thu, 15 Jan 2026 17:24:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1768497847; cv=none; b=cxITkWPZex8K7/uGzJC2JgvJdQZWh6vbrjp/s9S2cqQtKlVawZx70EEvxDwSB06zMfBvK92ZzFXxtJw+R+gJtoTcn8Jz1omNdKv4FLAHTcuwDbf1SI4+oEugxrJ3e+uH43IVsSuUrNKT+YgqRWUzeop6jj1UhA4HiPaPRSfRAwE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspac2:55:22.411Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:23.650Z [DEBUG] executePreToolHooks called for tool: Bash
2026-02-20T12:55:23.652Z [DEBUG] Getting matching hook commands for PreToolUse with query: Bash
2026-02-20T12:55:23.652Z [DEBUG] Found 1 hook matchers in settings
2026-02-20T12:55:23.652Z [DEBUG] Matched 1 unique hooks for query "Bash" (1 before deduplication)
2026-02-20T12:55:23.658Z [DEBUG] [useDeferredValue] Messages deferred by 2 (195→197)
2026-02-20T12:55:23.785Z [DEBUG] High write ratio: blit=0, write=71245 (100.0% writes), screen=1082x111
2026-02-20T12:55:23.787Z [DEBUG] Hooks: Checking initial response for async: {}
2026-02-20T12:55:23.787Z [DEBUG] Hooks: Parsed initial response: {}
2026-02-20T12:55:23.787Z [DEBUG] Hooks: Initial response is not async, continuing normal processing
2026-02-20T12:55:23.791Z [DEBUG] Successfully parsed and validated hook JSON output
2026-02-20T12:55:23.791Z [DEBUG] Hook PreToolUse:Bash (PreToolUse) success:
{}
2026-02-20T12:55:23.794Z [DEBUG] Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks. This feature is only available on Claude Sonnet 4+, Opus 4+, and newer models.
2026-02-20T12:55:23.795Z [DEBUG] Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks. This feature is only available on Claude Sonnet 4+, Opus 4+, and newer models.
2026-02-20T12:55:23.795Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.49.ecf; cc_entrypoint=cli; cch=00000;
2026-02-20T12:55:23.795Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-02-20T12:55:23.795Z [DEBUG] [API:auth] OAuth token check starting
2026-02-20T12:55:23.796Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.49.ecf; cc_entrypoint=cli; cch=00000;
2026-02-20T12:55:23.796Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-02-20T12:55:23.796Z [DEBUG] [API:auth] OAuth token check starting
2026-02-20T12:55:23.796Z [DEBUG] [API:auth] OAuth token check complete
2026-02-20T12:55:23.796Z [DEBUG] [API:auth] OAuth token check complete
2026-02-20T12:55:23.802Z [DEBUG] [useDeferredValue] Messages deferred by 2 (195→197)
2026-02-20T12:55:24.653Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:24.723Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:24.877Z [DEBUG] Permission suggestions for Bash: [
  {
    "type": "addRules",
    "rules": [
      {
        "toolName": "Bash",
        "ruleContent": "make build-backend:*"
      }
    ],
    "behavior": "allow",
    "destination": "localSettings"
  }
]
2026-02-20T12:55:24.877Z [DEBUG] executePermissionRequestHooks called for tool: Bash
2026-02-20T12:55:24.879Z [DEBUG] Getting matching hook commands for PermissionRequest with query: Bash
2026-02-20T12:55:24.879Z [DEBUG] Found 0 hook matchers in settings
2026-02-20T12:55:24.879Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
2026-02-20T12:55:26.211Z [DEBUG] AutoUpdaterWrapper: Installation type: npm-global
2026-02-20T12:55:29.230Z [DEBUG] [useDeferredValue] Messages deferred by 1 (197→198)
2026-02-20T12:55:29.240Z [DEBUG] Writing to temp file: /home/josie/.claude.json.tmp.70456.1771592129240
2026-02-20T12:55:29.240Z [DEBUG] Preserving file permissions: 100644
2026-02-20T12:55:29.240Z [DEBUG] Temp file written successfully, size: 139183 bytes
2026-02-20T12:55:29.240Z [DEBUG] Applied original permissions to temp file
2026-02-20T12:55:29.240Z [DEBUG] Renaming /home/josie/.claude.json.tmp.70456.1771592129240 to /home/josie/.claude.json
2026-02-20T12:55:29.240Z [DEBUG] File /home/josie/.claude.json written atomically
2026-02-20T12:55:30.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (198→199)
2026-02-20T12:55:31.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (199→200)
2026-02-20T12:55:32.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (200→201)
2026-02-20T12:55:33.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (201→202)
2026-02-20T12:55:34.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (202→203)
2026-02-20T12:55:35.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (203→204)
2026-02-20T12:55:36.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (204→205)
2026-02-20T12:55:37.228Z [DEBUG] [useDeferredValue] Messages deferred by 1 (205→206)
2026-02-20T12:55:38.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (206→207)
2026-02-20T12:55:39.230Z [DEBUG] [useDeferredValue] Messages deferred by 1 (207→208)
2026-02-20T12:55:40.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (208→209)
2026-02-20T12:55:41.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (209→210)
2026-02-20T12:55:41.715Z [ERROR] Error: Error: 1P event logging: 6 events failed to export (code=ETIMEDOUT)
    at QF8.queueFailedEvents (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:2315)
    at async QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1197)
2026-02-20T12:55:41.715Z [ERROR] Error: Error: {"stack":"Error: Failed to export 6 events (code=ETIMEDOUT)\n    at QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1372)","message":"Failed to export 6 events (code=ETIMEDOUT)","name":"Error"}
    at zE8.error (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2173:34863)
    at oQ1.error (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:117:64373)
    at file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:117:95398
    at $fK (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:117:95944)
    at file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:118:20245
2026-02-20T12:55:41.715Z [ERROR] [3P telemetry] OTEL diag error: {"stack":"Error: Failed to export 6 events (code=ETIMEDOUT)\n    at QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1372)","message":"Failed to export 6 events (code=ETIMEDOUT)","name":"Error"}
2026-02-20T12:55:42.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (210→211)
2026-02-20T12:55:43.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (211→212)
2026-02-20T12:55:44.233Z [DEBUG] [useDeferredValue] Messages deferred by 1 (212→213)
2026-02-20T12:55:45.230Z [DEBUG] [useDeferredValue] Messages deferred by 1 (213→214)
2026-02-20T12:55:46.229Z [DEBUG] [useDeferredValue] Messages deferred by 1 (214→215)
2026-02-20T12:55:47.234Z [DEBUG] [useDeferredValue] Messages deferred by 1 (215→216)
2026-02-20T12:55:48.234Z [DEBUG] [useDeferredValue] Messages deferred by 1 (216→217)
2026-02-20T12:55:49.234Z [DEBUG] [useDeferredValue] Messages deferred by 1 (217→218)
2026-02-20T12:55:49.934Z [DEBUG] Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks. This feature is only available on Claude Sonnet 4+, Opus 4+, and newer models.
2026-02-20T12:55:49.935Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.49.ecf; cc_entrypoint=cli; cch=00000;
2026-02-20T12:55:49.935Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-02-20T12:55:49.935Z [DEBUG] [API:auth] OAuth token check starting
2026-02-20T12:55:49.935Z [DEBUG] [API:auth] OAuth token check complete
2026-02-20T12:55:49.937Z [DEBUG] Getting matching hook commands for PostToolUse with query: Bash
2026-02-20T12:55:49.937Z [DEBUG] Found 6 hook matchers in settings
2026-02-20T12:55:49.937Z [DEBUG] Matched 1 unique hooks for query "Bash" (1 before deduplication)
2026-02-20T12:55:50.087Z [DEBUG] High write ratio: blit=0, write=71342 (100.0% writes), screen=1085x111
2026-02-20T12:55:50.089Z [DEBUG] Hooks: Checking initial response for async: {}
2026-02-20T12:55:50.089Z [DEBUG] Hooks: Parsed initial response: {}
2026-02-20T12:55:50.089Z [DEBUG] Hooks: Initial response is not async, continuing normal processing
2026-02-20T12:55:50.093Z [DEBUG] Successfully parsed and validated hook JSON output
2026-02-20T12:55:50.093Z [DEBUG] Hook PostToolUse:Bash (PostToolUse) success:
{}
2026-02-20T12:55:50.094Z [DEBUG] MCP server "ide": Calling MCP tool: getDiagnostics
2026-02-20T12:55:50.095Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2026-02-20T12:55:50.095Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2026-02-20T12:55:50.095Z [DEBUG] Hooks: Found 0 total hooks in registry
2026-02-20T12:55:50.095Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2026-02-20T12:55:50.095Z [DEBUG] MCP server "ide": Tool 'getDiagnostics' completed successfully in 1ms
2026-02-20T12:55:50.096Z [DEBUG] Tool search disabled via experiment (tengu_tst_kx7): below threshold, deferred tools present [source: query]
2026-02-20T12:55:50.100Z [DEBUG] Writing to temp file: /home/josie/.claude.json.tmp.70456.1771592150100
2026-02-20T12:55:50.100Z [DEBUG] Preserving file permissions: 100644
2026-02-20T12:55:50.100Z [DEBUG] Temp file written successfully, size: 139183 bytes
2026-02-20T12:55:50.100Z [DEBUG] Applied original permissions to temp file
2026-02-20T12:55:50.100Z [DEBUG] Renaming /home/josie/.claude.json.tmp.70456.1771592150100 to /home/josie/.claude.json
2026-02-20T12:55:50.100Z [DEBUG] File /home/josie/.claude.json written atomically
2026-02-20T12:55:50.101Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.49.994; cc_entrypoint=cli; cch=00000;
2026-02-20T12:55:50.102Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-02-20T12:55:50.102Z [DEBUG] [API:auth] OAuth token check starting
2026-02-20T12:55:50.102Z [DEBUG] [API:auth] OAuth token check complete
2026-02-20T12:55:50.111Z [DEBUG] [useDeferredValue] Messages deferred by 4 (218→222)
2026-02-20T12:55:50.665Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:52.837Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:53.670Z [DEBUG] executePreToolHooks called for tool: Bash
2026-02-20T12:55:53.672Z [DEBUG] Getting matching hook commands for PreToolUse with query: Bash
2026-02-20T12:55:53.672Z [DEBUG] Found 1 hook matchers in settings
2026-02-20T12:55:53.672Z [DEBUG] Matched 1 unique hooks for query "Bash" (1 before deduplication)
2026-02-20T12:55:53.680Z [DEBUG] [useDeferredValue] Messages deferred by 2 (222→224)
2026-02-20T12:55:53.832Z [DEBUG] High write ratio: blit=0, write=71530 (100.0% writes), screen=1088x111
2026-02-20T12:55:53.834Z [DEBUG] Hooks: Checking initial response for async: {}
2026-02-20T12:55:53.834Z [DEBUG] Hooks: Parsed initial response: {}
2026-02-20T12:55:53.834Z [DEBUG] Hooks: Initial response is not async, continuing normal processing
2026-02-20T12:55:53.837Z [DEBUG] Successfully parsed and validated hook JSON output
2026-02-20T12:55:53.837Z [DEBUG] Hook PreToolUse:Bash (PreToolUse) success:
{}
2026-02-20T12:55:53.838Z [DEBUG] Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks. This feature is only available on Claude Sonnet 4+, Opus 4+, and newer models.
2026-02-20T12:55:53.839Z [DEBUG] Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks. This feature is only available on Claude Sonnet 4+, Opus 4+, and newer models.
2026-02-20T12:55:53.839Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.49.88b; cc_entrypoint=cli; cch=00000;
2026-02-20T12:55:53.839Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-02-20T12:55:53.839Z [DEBUG] [API:auth] OAuth token check starting
2026-02-20T12:55:53.839Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.49.88b; cc_entrypoint=cli; cch=00000;
2026-02-20T12:55:53.839Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-02-20T12:55:53.839Z [DEBUG] [API:auth] OAuth token check starting
2026-02-20T12:55:53.839Z [DEBUG] [API:auth] OAuth token check complete
2026-02-20T12:55:53.839Z [DEBUG] [API:auth] OAuth token check complete
2026-02-20T12:55:53.841Z [DEBUG] [useDeferredValue] Messages deferred by 2 (222→224)
2026-02-20T12:55:55.125Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:55.127Z [DEBUG] Stream started - received first chunk
2026-02-20T12:55:55.129Z [DEBUG] Permission suggestions for Bash: [
  {
    "type": "addRules",
    "rules": [
      {
        "toolName": "Bash",
        "ruleContent": "scp:*"
      }
    ],
    "behavior": "allow",
    "destination": "localSettings"
  }
]
2026-02-20T12:55:55.129Z [DEBUG] executePermissionRequestHooks called for tool: Bash
2026-02-20T12:55:55.131Z [DEBUG] Getting matching hook commands for PermissionRequest with query: Bash
2026-02-20T12:55:55.131Z [DEBUG] Found 0 hook matchers in settings
2026-02-20T12:55:55.131Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
2026-02-20T12:55:58.936Z [ERROR] Error: Error: 1P event logging: 29 events failed to export (code=ETIMEDOUT)
    at QF8.queueFailedEvents (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:2315)
    at async QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1197)
2026-02-20T12:55:58.937Z [ERROR] Error: Error: {"stack":"Error: Failed to export 29 events (code=ETIMEDOUT)\n    at QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1372)","message":"Failed to export 29 events (code=ETIMEDOUT)","name":"Error"}
    at zE8.error (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2173:34863)
    at oQ1.error (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:117:64373)
    at file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:117:95398
    at $fK (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:117:95944)
    at file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:118:20245
2026-02-20T12:55:58.937Z [ERROR] [3P telemetry] OTEL diag error: {"stack":"Error: Failed to export 29 events (code=ETIMEDOUT)\n    at QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1372)","message":"Failed to export 29 events (code=ETIMEDOUT)","name":"Error"}
2026-02-20T12:56:01.145Z [DEBUG] Getting matching hook commands for Notification with query: permission_prompt
2026-02-20T12:56:01.145Z [DEBUG] Found 0 hook matchers in settings
2026-02-20T12:56:01.145Z [DEBUG] Matched 0 unique hooks for query "permission_prompt" (0 before deduplication)
2026-02-20T12:56:06.403Z [ERROR] Error: Error: 1P event logging: 1 events failed to export (code=ETIMEDOUT)
    at QF8.queueFailedEvents (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:2315)
    at async QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1197)
2026-02-20T12:56:06.404Z [ERROR] Error: Error: {"stack":"Error: Failed to export 1 events (code=ETIMEDOUT)\n    at QF8.doExport (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:6143:1372)","message":"Failed to export 1 events (code=ETIMEDOUT)","name":"Error"}
    at zE8.error (file:///home/josie/.config/nvm/versions/node/v20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:2173:34863)
    at oQ1.error (file:///home/josie/.config/nvm/versionf871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Calling MCP tool: getDiagnostics","timestamp":"2026-01-18T15:57:20.851Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Tool 'getDiagnostics' completed successfully in 4ms","timestamp":"2026-01-18T15:57:20.855Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"WebSocket transport closed/disconnected, attempting automatic reconnection","timestamp":"2026-01-18T16:01:09.485Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Starting connection with timeout of 30000ms","timestamp":"2026-01-18T16:01:09.491Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Connection failed after 6ms: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:09.493Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"error":"Connection failed: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:09.493Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"WebSocket reconnection attempt 1 completed with status: failed","timestamp":"2026-01-18T16:01:09.493Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Scheduling reconnection attempt 2 in 1000ms","timestamp":"2026-01-18T16:01:09.494Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Starting connection with timeout of 30000ms","timestamp":"2026-01-18T16:01:10.499Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Connection failed after 5ms: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:10.500Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"error":"Connection failed: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:10.500Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"WebSocket reconnection attempt 2 completed with status: failed","timestamp":"2026-01-18T16:01:10.500Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Scheduling reconnection attempt 3 in 2000ms","timestamp":"2026-01-18T16:01:10.500Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Starting connection with timeout of 30000ms","timestamp":"2026-01-18T16:01:12.503Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Connection failed after 2ms: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:12.504Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"error":"Connection failed: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:12.504Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"WebSocket reconnection attempt 3 completed with status: failed","timestamp":"2026-01-18T16:01:12.505Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Scheduling reconnection attempt 4 in 4000ms","timestamp":"2026-01-18T16:01:12.505Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Starting connection with timeout of 30000ms","timestamp":"2026-01-18T16:01:16.507Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Connection failed after 2ms: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:16.508Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"error":"Connection failed: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:16.508Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"WebSocket reconnection attempt 4 completed with status: failed","timestamp":"2026-01-18T16:01:16.508Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Scheduling reconnection attempt 5 in 8000ms","timestamp":"2026-01-18T16:01:16.508Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Starting connection with timeout of 30000ms","timestamp":"2026-01-18T16:01:24.510Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Connection failed after 2ms: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:24.511Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"error":"Connection failed: connect ECONNREFUSED 127.0.0.1:53927","timestamp":"2026-01-18T16:01:24.511Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"WebSocket reconnection attempt 5 completed with status: failed","timestamp":"2026-01-18T16:01:24.511Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
{"debug":"Max reconnection attempts (5) reached, giving up","timestamp":"2026-01-18T16:01:24.511Z","sessionId":"4beabb3b-a8ef-48cc-acde-ac6f871d2253","cwd":"/home/josie/development/archlinux/packaging/pacman-log.rs"}
