From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id BED2D80474 for ; Wed, 28 Oct 2026 12:32:53 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SCVess019965; Wed, 28 Oct 2026 15:31:40 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SCVess019965 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793190702; bh=wKLH61YRN3A6GSFZ230QvfqrGghCLZ8VzyZVobp4KmQ=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=WOCS1SLyLIfcc/t1qu2lnvpkyqVEinvOVc6QpuaBCQq8Z0rzGYNISCGxRv8BJpq3u Kal/3nOcaFKYisfe+6mSrL5ut3UETX/St/SKk+aqefSqm2SWDeIpDHIEXMaEOTrPX7 bL62GCjmXNM+rtDXW+Goyjf0iGMUE2KrSrWbajmrcV1+lUOzFmb27cAuTAPmZv63u4 G1H+tY3PBsAk68aYPzjuZzb6l+S0j2J8oa4KvoPBmgJG+qGKItqAfvn0Y3thv/NFmx 5117udtO/X5K/6Ts1vkG+oIulZn6i8ZmNK0lYZvH4vKqfjNwsy6csnY9hTqWcbhgMt 7NmJM4s8W48nA== Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SCVZ4U019950 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 28 Oct 2026 15:31:35 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SCVZ4U019950 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="NJnZGVhH" Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4a1d1f26a63so8479735e9.1 for ; Wed, 28 Oct 2026 05:31:35 -0700 (PDT) X-Gm-Message-State: AFq9FYIYxxNaDHxEu8mLSAyOM5GuinFxbbRA0qYNb/D620r00PdLDO12 9i63AAZlLoNrJtjss0a+JYCYwJjdrM4fawz+HQ3KqvCscFW6R3RkwIjjNCJBzEd4NpFd8E2MAio 50OxjNQ2jlOFIIawvWdEQeFFrCxMsKNpu3R0DC5Eo+4/MxtDqYn//vA== X-Gm-Gg: AYBFou1+HYZ+VtKkzy9BFEHuP/lDHA6622cvbA2Lyk9nhcz/II2IwTHph431jHmtJky gCPe8GpNANzO+m7De8wnRAuP36pf7dFH+co2m1E5sVF0ZJjVrsa4IfZzjsLNvMVFO6bJrk6yOV2 LOD+vvDDbbWvbIrqKWhjLCZrCWLngXw1Cr252jRUVjNMKnJ1cS4A8+VHclvL3s9U/TRPuxykfhA uPN3yBLQcz9yJ0hMmd1bKX7DA/TDotZpWOkHUqGyGaO2mg7rFkBRStceM6QY/3Mqyab/6uUWzAE 0kzap7Oq4w== X-Received: by 2002:a05:600c:8718:b0:4a4:de70:2ad4 with SMTP id 5b1f17b1804b1-4a9670165d0mr45585275e9.22.1793190694920; Wed, 28 Oct 2026 05:31:34 -0700 (PDT) X-Received: by 2002:a05:600c:8718:b0:4a4:de70:2ad4 with SMTP id 5b1f17b1804b1-4a9670165d0mr45584675e9.22.1793190694358; Wed, 28 Oct 2026 05:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793190694; cv=none; d=google.com; s=arc-20260327; b=m8ehY+/BmKOTQt73eFc4MQy4mGMOfn3q3agfCnyWXKEjvOhk7w1Prz+SObimYxypWC pnUMgWPcQDtgGc6qr/rSfQBkyX67y7IClfH7f/iW9mO8xLDK09hLiHgrQXmaaAPTaqFG ipSOG8dsDAIvzrFGFHPR2w7NkEGYro0x535Ca7vXIvoykuxsMQcbB4GBu5HJMuWkD9/m OXmeBieykwgmbQBjPCEcMusNI782UvnRc1n+7+4v1tTIxbya2V4gdBdbXVFlS9d+zLml WZVcgu6wZgt5MXlCJLwe8REBmbhB2XyL06TZJ0Y5tzd0ob9C8oNsHBIQd+2ok56B8pdy HMMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=uvAs2IFrO++mlfnvGOIE9MlvijIlTlEGpOrrgJjaEgg=; fh=Kr/R+ZQiC/tid3qUs5C3px+AHPSuipOrrdrDcZfSlMY=; b=rzHVfpxMNY9HeNn18ot4zSktpPXl8/zypv8m1e3Cw8P0WSFEozQLg3osSgyk/bBDio raeMQfqgdl199zdXVHuXB3VyPpanq5qqd9oYG5a7k351bor8ZBXK5WSDCuEFWd6xWtHJ 3B1oH0CYg0RQeVtfjXSShtZWRP2nlsEM7V5BTEzjWKX3Q/2yOYuSYcluQGx/Zc5D1nCp ICVEfdraUqVdgfIH5ZKdyEBhegLa37yC4aRv8/DVCSW7K+2AZ72QDLbd/wJFODBA7MGM vTSvNrytsQL6chHYjuHAXfzGyODJs/1gyiMnW0CtGdH4Z+yMYErW4ndChFhdukglmy0q PYZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=NJnZGVhH; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-4a855e2594asor10215255e9.9.2026.10.28.05.31.34 for (Google Transport Security); Wed, 28 Oct 2026 05:31:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) client-ip=2a06:5b06:b600:300:2c3:d099:6fb:56cf; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=NJnZGVhH; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793190694; x=1793795494; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=uvAs2IFrO++mlfnvGOIE9MlvijIlTlEGpOrrgJjaEgg=; b=NJnZGVhHucHT01YGtUALLt8NdvyhA/yNiNYfBaJFn7nlLXhBTH7ibFhBofa3jTimMJ lTQKQRwi0e0TNo64WEpNeIRXyCnUory0zPCpQ2GN+ZfvweXmpixwXEvcIqjqVsVEmJgF ns0S7NYBGI2Oi4zqRwN7PeRK3wZh4pDqpvuJrpsCTOEbjhF16ZGDnWqwqO6QHL7gQBgn tW/+GX2XxtdsRCR9XJuGOS3GTAnc9MA/WrTsMDWsV2Vtd2m/WJjsSo1Q9LWd0UrqbkiR SUGzi5Oquq+qxHtAP8LSMlUXg6Qk4BOGzWr1NYFrWG0RKB+7QGVXGn9yYzth23rrE/di v5hg== X-Received: by 2002:a05:600c:3146:b0:4a2:fe11:9a8a with SMTP id 5b1f17b1804b1-4a96552d0b9mr40963325e9.0.1793190693888; Wed, 28 Oct 2026 05:31:33 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:2c3:d099:6fb:56cf]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a9733d48b4sm48869705e9.0.2026.10.28.05.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2026 05:31:33 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Wed, 28 Oct 2026 13:31:28 +0100 Message-ID: <20261028123130.2828357-2-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261028123130.2828357-1-den@openvz.org> References: <20261028123130.2828357-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 1/2] dm-zero-rq: fix a NULL dereference mapping a flush request X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev zero_clone_and_map_rq() reads the operation from rq->bio. The flush request the block layer issues for a preflush carries no bio, so the target oopses in the kblockd worker: BUG: kernel NULL pointer dereference, address: 0000000000000010 RIP: 0010:zero_clone_and_map_rq+0x12/0x70 [dm_zero_rq] map_request+0x57/0x230 [dm_mod] dm_mq_queue_rq+0xe0/0x240 [dm_mod] zero-rq advertises no write cache, but a flush reaches it anyway after a table swap. ploop releases a device by reloading it to the error target, which keeps the write cache on, and later to zero-rq while the file system on top is still mounted. A flush queued against the previous table waits out the suspend and is dispatched to zero-rq on resume. A sync during "vzctl release-disks" is enough to hit it. Take the operation from the request. The flush is now killed like any other request zero-rq does not handle. Fixes: caf9c61aeb93 ("dm-zero-req: Introduce zero request based target") https://virtuozzo.atlassian.net/browse/VSTOR-152097 Feature: cbt: changed block tracking (for backup) Signed-off-by: Denis V. Lunev --- drivers/md/dm-zero-rq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-zero-rq.c b/drivers/md/dm-zero-rq.c index 9e44de15dcd6..4f09266ff5ed 100644 --- a/drivers/md/dm-zero-rq.c +++ b/drivers/md/dm-zero-rq.c @@ -38,7 +38,7 @@ static int zero_clone_and_map_rq(struct dm_target *ti, struct request *rq, { struct bio *bio = rq->bio; - switch (bio_op(bio)) { + switch (req_op(rq)) { case REQ_OP_READ: while (bio) { zero_fill_bio(bio); -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel