From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <010701a1a1b95e47-fd2f4454-31d3-4d97-95f1-e06e7fb495e5-000000@eu-central-1.amazonses.com> Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11021077.outbound.protection.outlook.com [40.107.130.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id CB50980E7E for ; Tue, 3 Nov 2026 14:04:11 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xcijY50Vr621utItHEhbl90MChtPhMZMTpPP8fxdFzpRMFjTp7l1yxRokpm2LjedxVcci0LYT0vaSYUyMpN9TRe4B0qHIUYLApYx0lp3N2nrWyw18NXRZWdzUXGA1FQlXL+iq4TxU4GEK0UiggIyU1B4deAcZ98k1+KS/wl6Mzj+i75QqlPTTXUmSEBohRwUXMDPVaHk0gcFNy4nMZCzy+PKKdXQyVEA48b/lgoI2j5vbaqOgByzxWuK+FoamHgzdVdlplkt++mnqnteSmAtxMw4hsb1fJxb4Flsm7U18kjEWOUb0Xo5dQ66ZWlHeUntc6rakALj0Pk61iv97IxJ7A== 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=8Xi1EbmS/V0RfjJqS0X2Hnh8qq1cZkC8UqijJS1hubY=; b=qbRSx3ZnU4hSCQVSZ3qgzLDtUnO9rniB2LXrLtmmN9eCms+H1FVUbhqptKNWJfJZgBx7O4OCJWfBiGKoNpL6/nm/IseZB3NKYhUisSHl1RLm/N4hLsiMwlS2VWas9l5PTayfDdvL5FlY+AIB0xT2THuv4ur0MRZVOGPPSeEsYANXDsEeeb2+BRGQMHI5F/XtY3qSp1G5yJI3MzBRZDIV/SYFfkIDhMlC/CJJNG2ZCFH0uL8EdVQYqSB+QsjszjgSGXftz3vuB74x/Rg+O0AWh3nYhonZnrjeXz+AKjTbiznNAGGeRKd9Wid0pR4d7uBA5m4hyoi4hnuvuQ/bXKXzEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 69.169.224.5) smtp.rcpttodomain=virtuozzo.com smtp.mailfrom=eu-central-1.amazonses.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com; dkim=pass (signature was verified) header.d=amazonses.com; arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.onmicrosoft.com; s=selector2-virtuozzo-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Xi1EbmS/V0RfjJqS0X2Hnh8qq1cZkC8UqijJS1hubY=; b=oVD+18O6ODcJi0VKMp5PHgU815BBWDPUMEIJb7vELxtHRk3LeHjgL9MxLQLqN+L9fGlUPNMappSZUyFUGcl9ojLmJEBr8QtiE964UJLQ2A10CbtD8P2KKg+sj4Bgp7ddNNctqS6huQH2EYEVglEZ+p3dCSlkldnx+vESWs8sGT0= Received: from PAZP264CA0104.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fb::13) by AS2PR08MB9151.eurprd08.prod.outlook.com (2603:10a6:20b:579::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.12; Tue, 3 Nov 2026 14:04:03 +0000 Received: from MI3PEPF0000848B.eurprd02.prod.outlook.com (2603:10a6:102:1fb:cafe::a3) by PAZP264CA0104.outlook.office365.com (2603:10a6:102:1fb::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.8 via Frontend Transport; Tue, 3 Nov 2026 14:04:03 +0000 Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 69.169.224.5) smtp.mailfrom=eu-central-1.amazonses.com; dkim=pass (signature was verified) header.d=sashiko.virtuozzo.com;dkim=pass (signature was verified) header.d=amazonses.com;dmarc=pass action=none header.from=sashiko.virtuozzo.com; Received-SPF: Pass (protection.outlook.com: domain of eu-central-1.amazonses.com designates 69.169.224.5 as permitted sender) receiver=protection.outlook.com; client-ip=69.169.224.5; helo=b224-5.smtp-out.eu-central-1.amazonses.com; pr=C Received: from b224-5.smtp-out.eu-central-1.amazonses.com (69.169.224.5) by MI3PEPF0000848B.mail.protection.outlook.com (10.167.240.138) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.592.5 via Frontend Transport; Tue, 3 Nov 2026 14:04:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=23yjbh4k34hwzfubhuiim7m4inbd3ick; d=sashiko.virtuozzo.com; t=1793714642; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=TstFuIzQDsAZqQE71epFlPnsXAlGpjyQWwm4W+wTHAI=; b=TwpeSZ7H9RSCcs1Gni444bJHl+WCP2nERBtYHJc9sy+LD9lgczo1FKKA/rrGj7TW DgedZ0V+0TqJOeZrS8BisLCjxaYETrATDX7De3Zt7st6LRVU24zE7c7wNmly7QRWG5J ZvRYlTB4bTdnBaAtjatwB7S5tL0fUP/V2COUhoj0TABN3gCQ9AQcug4TkURNk/VjQNa zS6x7Dm9zTTDPo187UqCk2Py0++rwDZPqPtmbHLFD9ZZFMVJGUts0Y9yXE4oPUQcwxP 2hYtxVZj4KpOL5OXpeWdwfI2K0HT8UEhkqMiXIg+kwPCls8v09AgoAmri2q9tsMJVDt hu4dmhap3w== DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=qftdzk2dqsatjnlrq4r5brjbihpfcrsh; d=amazonses.com; t=1793714642; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date:Feedback-ID; bh=TstFuIzQDsAZqQE71epFlPnsXAlGpjyQWwm4W+wTHAI=; b=iXNUwdwRGwA2rs+v89xpL3nj+NNjcesUgBSUSeHiePt8FS135xlx9JJJq5d+BGKf WCAjx8bZaKYe+eyCxaVdC3vyvcwGjdQ8yO9IM1Mjdt/x0/hb6EmkaCPbwJNmz7U7abl uDFvtYYOta1IWLs6OCNsosWSP1H40aKN/BYy6rGM= Message-ID: <010701a1a1b95e47-fd2f4454-31d3-4d97-95f1-e06e7fb495e5-000000@eu-central-1.amazonses.com> From: no-reply@sashiko.virtuozzo.com Subject: Re: [PATCH QEMU HCI-8.1 v7 06/35] migration/cpr-exec: close the persisted state if the channel fails to open To: Andrey Drobyshev , svt-core@virtuozzo.com Cc: andrey.drobyshev@virtuozzo.com In-Reply-To: <20261103-vfio_v1-v7-6-4467fdccbbe6@virtuozzo.com> References: <20261103-vfio_v1-v7-0-4467fdccbbe6@virtuozzo.com> <20261103-vfio_v1-v7-6-4467fdccbbe6@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 3 Nov 2026 14:04:02 +0000 Feedback-ID: ::1.eu-central-1.2wRQJBpg9g1fGRYexx3dUuYGS25Bux+2TEOx72/m6U4=:AmazonSES X-SES-Outgoing: 2026.11.03-69.169.224.5 X-EOPAttributedMessage: 0 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MI3PEPF0000848B:EE_|AS2PR08MB9151:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 55fadb6b-fc37-491d-48b6-08df39b350fa X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-MS-Exchange-AtpMessageProperties: SA List-Id: svt-core@virtuozzo.com X-MS-Exchange-Transport-Rules-Loop: 1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|704161411799003|48200799018|9140799003|32142699015|376014|61400799027|261022105027099003|261021121427099003|261022075727099003|261009223027099003|261026140227099003|261026121527099003|261028144727099003|4143699003|5023799004|10067099003|56012099006|260925022911599003|5063699009|22082099003|260925021911599003|260925021311599003|18002099003|261102123227099003|55112099003|5113699003|4113699003|16102099003; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VEpaVVAzZGp0djkvV0N4WUYzTVd1cHNGN0U2Ti9KNFI0dERtQTFHbEFCeXpT?= =?utf-8?B?UHBqVkVwaW9sVi9CSEJqZTJadFkvejJkNTJWU2kreXFMcnVVeW9WbzlBMkZu?= =?utf-8?B?SWNqemZEcGQvOFg1UnUvNDA3SE1tKzhXOVhqQSswQ3FCbTRvWTNrOWkyUnk3?= =?utf-8?B?VlB2T0wzMnNWcXoxdVlFNFkwQS9FWE1teXErb0crRG5wRldqa0IyK1pJc2x5?= =?utf-8?B?ZmFaNlk0ZVl5NTlhWm9wZk9ydnlmbG84ckh4QTlRSXV1Nlc1eXA0K1FyQjM5?= =?utf-8?B?MjZtSVQxUTVFblJqU29ZNk1ZNWxCSEtuVTFJSjZuZU1QQS82ZUM5QnlpSnp5?= =?utf-8?B?TVVMeVorLy8wdC85eEJFRFFWM1p5TnJiN3Yyd2YwbWR4VkFwSlpVUkd6ZnVu?= =?utf-8?B?UXpWME45K1JPTWo4d0k0V0FuYlJIL0I1SHIxK1hHN2lWRjdYamhjVjVyOENu?= =?utf-8?B?dU90amZUK3E5MlZzc245MFBFT0U1L0p3bTJhcnkya0YvaGlXMzV0bEZnTnBx?= =?utf-8?B?OTdEQnVnaThYYVhhZzgyUzR6M01yRUZCL3Z2VkgweHNucEFVQnZiWi93cXRi?= =?utf-8?B?eDRjMWVjM0t4b21Sbmp1UWdlQWNORjcvNFY1QmRDem5IV1JlNTArZE0wa1Nj?= =?utf-8?B?V2xVZFNFWkRZdnI3YnY2ZE51NXZRM0Q1WWJxTmlEeFhuUFR2RFBHWWhrVTJD?= =?utf-8?B?bkVaUkdSL2UwQytJOVY2Y0U2THRubG5rYVN5OC9wT0NaZVhMSkw2ajVsNEEw?= =?utf-8?B?ekk1TWliWnowZ2NzYStHZjdDMWxSZ3YrNEswcEZOMTEyNER5ZVg2M3pqZDkw?= =?utf-8?B?ZzhwK3hwLzdxOFNnSVZFM2Z0ZFBVTU9UZTAxVEUrb3NINW9NWThYVEZCV2hP?= =?utf-8?B?VjJzaGNtZFBTandOMHN3b01ISFRjR3hMTkN1elRFM3dDYUxkbGowbTZKa0Zo?= =?utf-8?B?YWI3dSswQ2ttSDJaempYVFlnaHptNGRtc3YzT2xXVUpPQW1qUUtyOFEzV3Ur?= =?utf-8?B?ejVFUml5aFZvM3h5V0NnQW1iUUU5T0pkbUUyRm9LWCtiRzJuY05Pclkvemhq?= =?utf-8?B?eVFvNDM3YXpmMU9MT3JERUdNMHZqSzV5ZHoyNjVTVEgyNUpHOENXSGw1Vlkw?= =?utf-8?B?dU9henNLd0VaanFQSkEyYi9PTHRPMWxtSEJKb3JsQTNleTF4KzBqZC9CU2Rr?= =?utf-8?B?eFk1Yi9MY0NscmFCUWVYS2NRdllDYzN5elY5aFZRV1lPYU50RmtUcFVhVkp6?= =?utf-8?B?Um9WQUZGUEdwZHlMK0kxNEF3R1VJeEIrVHdqUkR5ZXdreCtpUXVhZ3JiTUln?= =?utf-8?Q?RiQ3mRvye74Q0=3D?= X-Forefront-Antispam-Report: CIP:69.169.224.5;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:b224-5.smtp-out.eu-central-1.amazonses.com;PTR:b224-5.smtp-out.eu-central-1.amazonses.com;CAT:NONE;SFS:(13230040)(704161411799003)(48200799018)(9140799003)(32142699015)(376014)(61400799027)(261022105027099003)(261021121427099003)(261022075727099003)(261009223027099003)(261026140227099003)(261026121527099003)(261028144727099003)(4143699003)(5023799004)(10067099003)(56012099006)(260925022911599003)(5063699009)(22082099003)(260925021911599003)(260925021311599003)(18002099003)(261102123227099003)(55112099003)(5113699003)(4113699003)(16102099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fmNNVy/XMN10VglCRou7y6lp9+oNV0GXBPqVLoOXtu8ndP97lAiqFhp7GEZ2bLu3l3twL1SPj4g9xVaiYSpOFMmi9i3kgxSmAr+X5M/NzfzXuNe8sRfmorLHGo5grjnfNQdwDm0Q7TjFbQYu/q4kt/N1a+BUBEGTWCHf1RXd71C8RbjLrbiXA1+j1O1an4P1zKl+xAhg2xyCblJIt83aj5+zDSn3bYkY8I2UUolEjUZ6BQwW62m47010FXAHOPO2AI7KJqV/L6UO2f4KGZx/Lo0IDbX06vXTwzT01LFxK7aX8JdG0qyeFMPPLCfZpg6SOt1UGd/vy0T5pibcx3/oRgWv/QfGlzsktm1Z+F4f8OuIolj0yYGh/bR+ymVWEKTXzdjW8sxYS+gnOs64FikA0fx7nkBjWvYQW6CGkeebQ5fFA+wZrF0SdP6EhamvhZaS X-ExternalRecipientOutboundConnectors: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2026 14:04:02.9680 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55fadb6b-fc37-491d-48b6-08df39b350fa X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: MI3PEPF0000848B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9151 Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [Low] migration/cpr-exec: unsetenv reorder not described in commit message -- commit d210939c2446d33dc691b9867615ff2066464565 Author: Andrey Drobyshev migration/cpr-exec: close the persisted state if the channel fails to open This patch releases the dup'd CPR state memfd and clears the environment variable when the migration channel fails to open, in qmp_migrate_finish(). It also makes cpr_exec_unpersist_state() return early when there is nothing to release. > diff --git a/migration/cpr-exec.c b/migration/cpr-exec.c > --- a/migration/cpr-exec.c > +++ b/migration/cpr-exec.c > @@ -68,8 +68,8 @@ static int cpr_exec_find_state(void) > int mfd; > =20 > assert(val); > - g_unsetenv(CPR_EXEC_STATE_NAME); > assert(!qemu_strtoi(val, NULL, 10, &mfd)); > + g_unsetenv(CPR_EXEC_STATE_NAME); > return mfd; > } [Severity: Low] This isn't a bug, but the commit message doesn't mention this change. In cpr_exec_find_state(), which runs on the incoming side after exec, g_unsetenv() is now called after qemu_strtoi() instead of before it. The commit message describes only the release on channel open failure and the no-op behaviour of cpr_exec_unpersist_state(). Could the commit message mention this reorder and explain why it is needed? Before the change, qemu_strtoi() parsed val after g_unsetenv() had already removed the environment entry. > @@ -83,9 +83,11 @@ void cpr_exec_unpersist_state(void) > int mfd; > const char *val =3D g_getenv(CPR_EXEC_STATE_NAME); > =20 > - g_unsetenv(CPR_EXEC_STATE_NAME); > - assert(val); > + if (!val) { > + return; > + } > assert(!qemu_strtoi(val, NULL, 10, &mfd)); > + g_unsetenv(CPR_EXEC_STATE_NAME); > close(mfd); > } [Severity: Low] This isn't a bug, but the same reorder is made here in cpr_exec_unpersist_state(), and the commit message doesn't mention it either. Could the commit message cover both g_unsetenv() moves? --=20 Sashiko AI review =C2=B7 https://sashiko.vzint.dev/#/patchset/20261103-vfio= _v1-v7-0-4467fdccbbe6@virtuozzo.com?part=3D6