From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from DU0PR08MB8688.eurprd08.prod.outlook.com (2603:10a6:10:400::13) by PAXPR08MB6942.eurprd08.prod.outlook.com with HTTPS; Fri, 11 Sep 2026 11:11:27 +0000 Received: from AM7PR03CA0030.eurprd03.prod.outlook.com (2603:10a6:20b:130::40) by DU0PR08MB8688.eurprd08.prod.outlook.com (2603:10a6:10:400::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.428.7; Fri, 11 Sep 2026 11:11:24 +0000 Received: from AMS0EPF00000566.eurprd02.prod.outlook.com (2603:10a6:20b:130:cafe::81) by AM7PR03CA0030.outlook.office365.com (2603:10a6:20b:130::40) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.406.7 via Frontend Transport; Fri, 11 Sep 2026 11:11:24 +0000 Authentication-Results: spf=softfail (sender IP is 99.81.216.78) smtp.mailfrom=openvz.org; dkim=pass (signature was verified) header.d=openvz.org;dmarc=pass action=none header.from=openvz.org;compauth=pass reason=100 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning openvz.org discourages use of 99.81.216.78 as permitted sender) Received: from nat.eu.perception-point.io (99.81.216.78) by AMS0EPF00000566.mail.protection.outlook.com (10.167.242.116) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.406.5 via Frontend Transport; Fri, 11 Sep 2026 11:11:23 +0000 X-PERCEPTION-POINT-VERDICT: CLN X-PERCEPTION-POINT-SPF: X-PERCEPTION-POINT-SPAM: PASS X-PERCEPTION-POINT-SENDER-IP: 2a00:1450:4864:31::10 X-PP-Forefront-Antispam-Report: CIP:2a00:1450:4864:31::10;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail-wm2-x10.google.com;PTR:mail-wm2-x10.google.com;CAT:NONE;SFS:(13230040)(704162211799003)(82310400026)(6059299003)(12012899012)(2092899012)(3072899012)(43022699015)(10067099003)(19002099009)(18002099003)(55112099003)(16102099003)(5023799004)(5063699009)(56012099006);DIR:INB; Received: from AM0PR07CU002.outbound.protection.outlook.com (mail-am0pr07cu00207.outbound.protection.outlook.com [40.93.65.71]) by inbound-smtp.eu-west-1.amazonaws.com with SMTP id h0kbk7bfbt44scin7b9apus7mlachlpm2dnftg01; Fri, 11 Sep 2026 11:11:20 +0000 (UTC) X-SES-Spam-Verdict: PASS X-SES-Virus-Verdict: PASS Received-SPF: softfail (spfCheck: transitioning domain of openvz.org does not designate 40.93.65.71 as permitted sender) client-ip=40.93.65.71; envelope-from=den@openvz.org; helo=AM0PR07CU002.outbound.protection.outlook.com; Authentication-Results-Original: amazonses.com; spf=softfail (spfCheck: transitioning domain of openvz.org does not designate 40.93.65.71 as permitted sender) client-ip=40.93.65.71; envelope-from=den@openvz.org; helo=AM0PR07CU002.outbound.protection.outlook.com; dkim=pass header.i=@openvz.org; dmarc=pass header.from=openvz.org; X-SES-RECEIPT: AEFBQUFBQUFBQUFHK0tDNG80a0JQQm5nR09mSC84Ulpza0VDK3NTMlJMY3U0UzJGaGR4bG9IMG5WV1AwMVZKUTFDTzFWMkt0TXNodjZ3NjNUVG5FWWdpRHNCYUtUdFRLQnlBT0FoUm5XS1VNU0h6L3VaTkdaMVNrQVVXVGM3V1NST1VnRHZMR1BxUWpNMkFFTVdjd0VuNHdXendZd1YvN1NqOWpIZGhwZllMWXQzd0JMOWxEeUxhSE1tUkVPQzFFcG1OUU5vZzNzRWtnZkJOeVYrQ3RMbXR5a0JPSnFWNDdXMnNSNDRkalJNelRJeTdSUHBaUFYxTmFTRHVmdGlOSFVCMDhQeThubUd1bk9Nb044czJsV2NRb0ZWNVdGZmpyOVJ5ZSt1ZnhMM1pKNTdzV0E3VzVUdFE9PQ== X-SES-DKIM-SIGNATURE: a=rsa-sha256; q=dns/txt; b=6m9zHrGgt7VSMtNASouDbYuzR7rAyaWXGegJ7ubw0awGx5lX2lLWq47i3mB8GlngWc2ePo2MubZu29tQsecradntOtxAycJev5jxvgZ9LLATh290Knn/YBjJNYFnxN+VonraU8GWx6QnDxDFrtYi2Q8zr0ZKcYInS8cMyP6Ax1A=; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1789125081; v=1; bh=w8YJj3PraGUqIh1GhxP2Lw/XhHbj/jbnzxIDFKBEjiU=; h=From:To:Cc:Bcc:Subject:Date:Message-ID:MIME-Version:Content-Type:X-SES-RECEIPT; Received: from DUZPR01CA0024.eurprd01.prod.exchangelabs.com (2603:10a6:10:46b::11) by PAWPR08MB9614.eurprd08.prod.outlook.com (2603:10a6:102:2e8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.406.7; Fri, 11 Sep 2026 11:11:16 +0000 Received: from DB1PEPF00050A00.eurprd03.prod.outlook.com (2603:10a6:10:46b:cafe::58) by DUZPR01CA0024.outlook.office365.com (2603:10a6:10:46b::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.406.9 via Frontend Transport; Fri, 11 Sep 2026 11:11:16 +0000 Authentication-Results-Original: spf=pass (sender IP is 2a00:1450:4864:31::10) smtp.mailfrom=openvz.org; dkim=pass (signature was verified) header.d=openvz.org;dmarc=pass action=none header.from=openvz.org;compauth=pass reason=100 Received-SPF: Pass (protection.outlook.com: domain of openvz.org designates 2a00:1450:4864:31::10 as permitted sender) receiver=protection.outlook.com; client-ip=2a00:1450:4864:31::10; helo=mail-wm2-x10.google.com; pr=C Received: from mail-wm2-x10.google.com (2a00:1450:4864:31::10) by DB1PEPF00050A00.mail.protection.outlook.com (2603:10a6:18:3::6da) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.406.5 via Frontend Transport; Fri, 11 Sep 2026 11:11:14 +0000 Received: by mail-wm2-x10.google.com with SMTP id 5b1f17b1804b1-49b94fce6e8so6409875e9.2 for ; Fri, 11 Sep 2026 04:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1789125074; x=1789729874; darn=virtuozzo.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=S2J2Q28dKoeThjbbzi4Y4yio1bBFRbWh3yRuWASTvfY=; b=meak3HD2SCORoHG9Qxza2ZbjKlmvqV4er/5tHlqofLYXYjfdJjwbbiZwqI7CWtNVsv RSvp4sOqoupPF/d8ceqiiQP3INzcDzPXfQQ9blpMzE+bXvhwRpvC+Ni2VdKPkGzzqUph 1O/yPa6yvyc8vq0+YcobbVWNK2E8YswT3qhyQE1MOI8bY+zU675/Iq05a28fvdw7S6DF IGDCLCGpVK+p9+F7SB/+nqbKtvbDu5wRoGI/zWdkyIFsUYo0hFItK+4MyL8lYpZSviYp FzP9oUB07MrTN1JCt8i/k1ttA5Fcav0s36EQE/oB6P0NUwjZuHGIiI3unar/niGzIfON tYEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789125074; x=1789729874; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=S2J2Q28dKoeThjbbzi4Y4yio1bBFRbWh3yRuWASTvfY=; b=qLEBdEeTf3ELwkTiqotDUTUvS78Pse6oDJdbS50d8WPxV/iNN6SPuocQN37Onfv/UC DMiD4Uwuah/3wByW7rYcGxRYIgMzi2OPUt3mdR4cr8yROObRnbNFrRXFYcXCGBahcQ+7 efJL5queaiYUHgYdyfJslm8Ds39fOMNvLkXYeXEJkCVDXAJSGvHLMRPjH4OILfDexONA WlXdA9kI2pPGnPjVFxMsxnMiWJ0DrCnpAoAFJwkEyt9jgBN4QjAFDbr3GDfMlgiAAiXq sdQs2XW8arH05hIZurX/l7cV+y2SquBUAGxIe6ImTs/asOoogrqS0BO/wkT43ut9TdEm avFw== X-Gm-Message-State: AFuF++ljFQ14lKISm4Kdf7MsIIEg6qc4nD9VMwWa/+QRlrRsnCNh942e 8efI2oX45QDyEOM53XzFcJlYZmrwDpcJhfitqvp78MmgX9tJJB9bBFX9K+BY6j6tCGc3yWbZQHt YEFQ2VmE= X-Gm-Gg: AYBFou1szUyn49ebGPhNnSizRq+TPjHJhbzZqX6WWQi3mESFHpyD0T2tZ/Dm3+9pYU0 g1fOYgMlg0UYmtMOVHXLw4FKg8/RcdXdenfiH4w1JJB3XHQkn14mw3GgYEfoBRytJVGBzWD0Uus 5Z8UZMFvMFxfulOoi10GlnFRBaDyfZbc72epdgCLV3rjMstI8tTvbKY+MaGB4mDfvTv9IGZN6PR UM6SIuvXgw1e68doSFVIrm1w8uiEUjvqMC8EYBqKIbKE/Ai5dfyVLupczPE1lOhc8kO3lNVt4jx wngvWYvCzvZILDCc0HAP3QFgUVKE5sR7662O/tSWJWr0GDf1ETckpc2aq8y+yyJ12JrA2ZiPFlT BLw4Qw8oPb7pZbgEli9tVpB/H6x28J09cK7Hf6pmpHdPSIDRiovr10t+2VOBD1vYoxIkjwArY+5 j5Mr+jwfRz+6gk+PUHPRSCOANKp2XRK5H4WlopTzdXlMgRKRInNEBIMauxDhOG33QHiMM= X-Received: by 2002:a05:600c:6289:b0:49c:de80:b833 with SMTP id 5b1f17b1804b1-49e61983067mr38759155e9.2.1789125074157; Fri, 11 Sep 2026 04:11:14 -0700 (PDT) Return-Path: den@openvz.org Received: from athena.sw.ru ([2a06:5b06:b600:300:a007:bd26:918e:c58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49e61a33e34sm45452845e9.0.2026.09.11.04.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 04:11:13 -0700 (PDT) From: "Denis V. Lunev" To: svt-core@virtuozzo.com Cc: andrey.drobyshev@virtuozzo.com, den@openvz.org Subject: [PATCH hci-8.0] block/throttle-groups: fix crash when enabling I/O limits on a busy disk #VSTOR-144549 Date: Fri, 11 Sep 2026 13:11:11 +0200 Message-ID: <20260911111111.3752422-1-den@openvz.org> X-Mailer: git-send-email 2.53.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 1 X-EOPTenantAttributedMessage: 0bc7f26d-0264-416e-a6fc-8352af79c58f:1 X-MS-TrafficTypeDiagnostic: DB1PEPF00050A00:EE_|PAWPR08MB9614:EE_|AMS0EPF00000566:EE_|DU0PR08MB8688:EE_|PAXPR08MB6942:EE_ X-MS-Office365-Filtering-Correlation-Id: b2e1d5a2-c211-47c6-0b9e-08df0ff56aad X-MS-Exchange-AtpMessageProperties: SA|SL X-PERCEPTION-POINT-CUSTOM: vzpp X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|704162211799003|82310400026|6059299003|12012899012|2092899012|3072899012|43022699015|10067099003|19002099009|18002099003|55112099003|16102099003|5023799004|5063699009|56012099006; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?x9gwP+JCzNPNtsUcCjq9ntKe0kRiTns0B8iJDaczvJHeRdME/WjZ+2KDgq3Y?= =?us-ascii?Q?dOlrFSm846RtxO8tHTWqD4HqmfjvIyVqt6oVL2oO1gz+3oFkPeZhQLPa5n6A?= =?us-ascii?Q?3kBysLgq0kr0ykljyPlrAa1zPK7cHtsGOodnp5fXKC4mWwCyS4kaN4KsPt82?= =?us-ascii?Q?IVo9q4D03cuh0kdIBo/oVfotUTMIxsJnUfJ7WIJKGwKfR4KVTTAIFcaS6l8C?= =?us-ascii?Q?Qxu+O31uO0CgPds3NkZrNwnLzMvXdf0eFDkgq1GMahGklVCCflY6G/YXuZtE?= =?us-ascii?Q?O/cUMXuT18FKdMsgnAfl08zQOpqJbYTtqgK1bJChWTSKxhlefM90aiaKf25K?= =?us-ascii?Q?xwKeEC1qXVXxV1ysnSlzSg6Yw+tCCuLkXKyExYz4C1Fbe2zPXwrMxl9sYC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?= =?us-ascii?Q?rup3xkJZCRpgYlam2lapObJv095FzzoXGqE5WYxshSGArRW5gNpWzbnKPkVv?= =?us-ascii?Q?Y+4CE/BDASgAcpY/wFZGUhI8mqLDAA6GRB4rR0yB2gVxjGrgv9KpRX2BEfB3?= =?us-ascii?Q?2Mo9pl3jmG8616qkhKShG6pM7sYIWO1aJFTjvVSQNcQiCg=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:2a00:1450:4864:31::10;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail-wm2-x10.google.com;PTR:mail-wm2-x10.google.com;CAT:NONE;SFS:(13230040)(704162211799003)(82310400026)(6059299003)(12012899012)(2092899012)(3072899012)(43022699015)(10067099003)(19002099009)(18002099003)(55112099003)(16102099003)(5023799004)(5063699009)(56012099006);DIR:INB; X-Auto-Response-Suppress: DR, OOF, AutoReply X-Exchange-RoutingPolicyChecked: YJFiT/MxZ5/CSqw3+XOR2upF3Q+/pvPISUMCs+jMtIVV4qRvBJFiY2d+ZO+7vMjpFt3y2CSgqprKwMqpzeBHp4P9DqGUhRLHYTqbaJBNHz9QyyFb+hCRdTz19BRbDONzkJhyojUrran/PAlU7udWA844+RDSvG3VNIXcINnWhb6pOWnexn+lp8cmbi5fHhLhnSJeO4F3aWd5/SfKgBgKVY5OkstFAnlby9awBvHmqitUZ6TcqhALQCrFmpuWq2RIAiqDnXqQFCfF1lzj+sFMJnGxYSHN1McP6dLjZLmUQRve9d3G6kh19Sj6w+oZ0l5V1IguThV6XiLFsQrGheyL9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9614 X-MS-Exchange-Organization-ExpirationStartTime: 11 Sep 2026 11:11:24.1029 (UTC) X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000 X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit X-MS-Exchange-Organization-Network-Message-Id: b2e1d5a2-c211-47c6-0b9e-08df0ff56aad X-MS-Exchange-Organization-MessageDirectionality: Incoming X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF00000566.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Exchange-Organization-AuthSource: AMS0EPF00000566.eurprd02.prod.outlook.com X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Office365-Filtering-Correlation-Id-Prvs: 5e8a25d9-adfd-4c1f-ee5a-08df0ff56533 X-MS-Exchange-Organization-SCL: -1 X-Microsoft-Antispam: BCL:0;ARA:13230040|704162211799003|3072899012|12012899012|43022699015|2092899012|6059299003|82310400026|35042699022|19002099009|18003699003|5133699003|10067099003|5063699009|5023799004|57112099003|16102099003|55112099003; X-Forefront-Antispam-Report: CIP:99.81.216.78;CTRY:IE;LANG:en;SCL:-1;SRV:;IPV:CAL;SFV:SKN;H:nat.eu.perception-point.io;PTR:nat2.eu.perception-point.io;CAT:NONE;SFS:(13230040)(704162211799003)(3072899012)(12012899012)(43022699015)(2092899012)(6059299003)(82310400026)(35042699022)(19002099009)(18003699003)(5133699003)(10067099003)(5063699009)(5023799004)(57112099003)(16102099003)(55112099003);DIR:INB; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2026 11:11:23.6085 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2e1d5a2-c211-47c6-0b9e-08df0ff56aad X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF00000566.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8688 X-MS-Exchange-Transport-EndToEndLatency: 00:00:03.6600752 X-MS-Exchange-Processed-By-BccFoldering: 15.21.0406.000 Content-Type: text/plain X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(910005)(944506478)(944626604)(920097)(930201)(20251009189)(140003); X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?kUTFyIcJIvjYROSiNp2C5QdiMY+AP5jWJY2D5AZ17nc1+kEV0XJ9+gYgLr?= =?iso-8859-1?Q?VBKkCG6N0wGiqTnfZ6mkVqAY7OnDA8U3E9ei5dCZz0dTKXL/Q6l6To5mxq?= =?iso-8859-1?Q?A7i+K5I5DmiVW5Yj6WvOBB+LXpgz6P+vd4wsNyggWqihAm1Xc5ShrbOjuI?= =?iso-8859-1?Q?VTo60r4e1pBrAFzQyWacghfst3/HQijrVgjt+Ok17AjytjvLPJ9yWR1CSu?= =?iso-8859-1?Q?k0l60IJGTHr+RtMW3RI/BIbuvN4AMxAKo9WGnSisNjTIZQTwlbBU/R/XT8?= =?iso-8859-1?Q?CxgfD07Qmkm+W11HcnlYeBBg50j+gTBGVLPUGPX1b42HeZLQUmUrd4ylZs?= =?iso-8859-1?Q?a0KKExl26rurtOvLKAEgB34tTx443d8NX2OTjDS7edzGTigS+XCCK4syQf?= =?iso-8859-1?Q?FfnCCin7yNfuHYipTcjwQDvUsx9HFzs7fj2G3s3CH7rvMhH6Oyt4oPXIk9?= =?iso-8859-1?Q?xezheoEzRHkHg6Giuyk44b2YUpeD2EJEQl6dgRjQQy7Ao8AcaOd1kbN3aV?= =?iso-8859-1?Q?1jY7oiJVHkUkMtECM3gvirWZls15Pcq5qzymirHvAJOV/GYwXFMKxtIye0?= =?iso-8859-1?Q?7ujCcGdL/VRGiGgRN2YyaGjKVaflqRHHv46aJx3AeKiBB5kgRDhHoy+4X0?= =?iso-8859-1?Q?TfyHSGIkn+6pdjwbUMiTHkepDtdf9CDQemXmZw9uSDk93uP6e8yyPzxW9k?= =?iso-8859-1?Q?Cz+8DE7s82PRyu1LUR1hR3YcWj5lC5KtkGU8WZ6v0kuUu26o0H3T9OSIZv?= =?iso-8859-1?Q?JdNhYb1o91JujlY1McuG8hDYwpOxv29+Gb9+Ugt6vrHGgw9FcOJjsqYO0a?= =?iso-8859-1?Q?MXYQ8Xra378NrvGsf9MJHyvdBTHlWcilu6YBdL6oSwkoALGT3frRh6XUid?= =?iso-8859-1?Q?ztxQjTc1QvShmwNitGrL/66uJmLLJZvHgPxL/xTKeKiAi0Wdsvj/LbKGm6?= =?iso-8859-1?Q?IkJtZ+ONdDEf0t0eab37JspbbWqqnfq6xLuJ/78eSR4PLZ1a3cAnEUVnll?= =?iso-8859-1?Q?zzA5XRieZzXZt9OG6obsxLq8JuUZ2R2yezbBgsxPlQMpLFixU7BFazNKQt?= =?iso-8859-1?Q?/UDwNdub931s3IqVVH+gXIEulgJimZAwvDBcmPv+43qAwfFa3rh8/+wSRx?= =?iso-8859-1?Q?lHXwYHjMmbyWhWALgz5yH63rrMjkNV0OoyNfoac78YoYbMIYMkOoNbNpDA?= =?iso-8859-1?Q?4K6RVI8+OOEZvOR8/ksUGWccLoTXswBqikxmXIwXBxcBaeeUopDiYDvCS8?= =?iso-8859-1?Q?j8Ch9nFxmJLxLLZO0eSYAJpUtWIx75arsSy4isCiuCObgnhWklhlYb0A5P?= =?iso-8859-1?Q?Xo1kVA24BqiidctGAUim9jsPRL7s9qC+7zANVncIFbZhzkyBsexb6Z8jrE?= =?iso-8859-1?Q?0X9R5VUegEkOcb0NwetFF2l5vb3Bq68yzL9SRvm94mkNNwSb/pxOU69uW2?= =?iso-8859-1?Q?lhTR1gXW/p5J26G0hSaVzHkHBNQg1HalSfNIYc+CePEhgBxQCJt+JPhkZT?= =?iso-8859-1?Q?TMYSKmDaaiTegqTazo7qK3I9jYngPUINfFIbHJBJEO1SYYJTK6ks7ryln4?= =?iso-8859-1?Q?gndnyXFsEy+Vj9M7yWGdcE0esR4DXkqU72dQArHERG+u9QXxWUi6SFc1tG?= =?iso-8859-1?Q?JV0Yb+es7NENXAogXQwDQTit11rduflGpAv0Kji/AmO0VGoJ4+wDuK0fPO?= =?iso-8859-1?Q?FUh0TTUk13TVLYC4rqARGqCg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= =?iso-8859-1?Q?CivshCb+xDqabPAuZ7D7ma/WQo1H3cqNASJ4KecAiSEEjPsxsed8/VMlE7?= =?iso-8859-1?Q?Z3xaq8A2?= MIME-Version: 1.0 List-Id: From: Denis V. Lunev throttle_group_register_tgm() stores tgm->throttle_state before it takes tg->lock, so the I/O path can see a member whose group still has NULL tokens[] and an empty member list. A request in an iothread then reaches throttle_group_co_io_limits_intercept(), wins tg->lock ahead of the registering thread, and next_throttle_token() passes the NULL token to throttle_group_next_tgm(), which dereferences it: throttle_group_next_tgm (tgm=0x0) at block/throttle-groups.c:185 next_throttle_token (tgm=..., direction=THROTTLE_READ) throttle_group_co_io_limits_intercept (tgm=..., bytes=8192, ...) blk_co_do_preadv_part (blk=..., offset=..., bytes=8192, ...) blk_aio_read_entry (opaque=...) coroutine_trampoline (i0=..., i1=...) blk_io_limits_enable() does not drain the BlockBackend, unlike its disable counterpart, so nothing keeps requests away while the group is built. A guest probing a disk that libvirt has just attached, at the moment the QoS settings for it are applied, is enough to hit this. Publish tgm->throttle_state with a release store once the member is linked into the group and its timers exist, and read it with an acquire load on the two unlocked I/O paths. A request that sees the new pointer then also sees a fully built group. Cc: Kevin Wolf Cc: Hanna Reitz Cc: Alberto Garcia Signed-off-by: Denis V. Lunev Acked-by: Alberto Garcia --- block/block-backend.c | 12 ++++++------ block/throttle-groups.c | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 2cf17c0ebd4..486f77aea22 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1360,6 +1360,7 @@ blk_co_do_preadv_part(BlockBackend *blk, int64_t offset, int64_t bytes, QEMUIOVector *qiov, size_t qiov_offset, BdrvRequestFlags flags) { + ThrottleGroupMember *tgm = &blk->public.throttle_group_member; int ret; BlockDriverState *bs; IO_CODE(); @@ -1379,9 +1380,8 @@ blk_co_do_preadv_part(BlockBackend *blk, int64_t offset, int64_t bytes, bdrv_inc_in_flight(bs); /* throttling disk I/O */ - if (blk->public.throttle_group_member.throttle_state) { - throttle_group_co_io_limits_intercept(&blk->public.throttle_group_member, - bytes, THROTTLE_READ); + if (qatomic_load_acquire(&tgm->throttle_state)) { + throttle_group_co_io_limits_intercept(tgm, bytes, THROTTLE_READ); } ret = bdrv_co_preadv_part(blk->root, offset, bytes, qiov, qiov_offset, @@ -1435,6 +1435,7 @@ blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes, QEMUIOVector *qiov, size_t qiov_offset, BdrvRequestFlags flags) { + ThrottleGroupMember *tgm = &blk->public.throttle_group_member; int ret; BlockDriverState *bs; IO_CODE(); @@ -1453,9 +1454,8 @@ blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes, bdrv_inc_in_flight(bs); /* throttling disk I/O */ - if (blk->public.throttle_group_member.throttle_state) { - throttle_group_co_io_limits_intercept(&blk->public.throttle_group_member, - bytes, THROTTLE_WRITE); + if (qatomic_load_acquire(&tgm->throttle_state)) { + throttle_group_co_io_limits_intercept(tgm, bytes, THROTTLE_WRITE); } if (!blk->enable_write_cache) { diff --git a/block/throttle-groups.c b/block/throttle-groups.c index 4b1b1944c20..c84aafdc75e 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -581,7 +581,6 @@ void throttle_group_register_tgm(ThrottleGroupMember *tgm, ThrottleState *ts = throttle_group_incref(groupname); ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); - tgm->throttle_state = ts; tgm->aio_context = ctx; qatomic_set(&tgm->restart_pending, 0); @@ -602,6 +601,9 @@ void throttle_group_register_tgm(ThrottleGroupMember *tgm, read_timer_cb, write_timer_cb, tgm); + + /* The I/O path reads this without tg->lock, so publish it last */ + qatomic_store_release(&tgm->throttle_state, ts); } /* Unregister a ThrottleGroupMember from its group, removing it from the list, -- 2.53.0