From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796363723; b=DcPZL3LSdJt37x+lOXiXutjDS+NMhaQ9Pvzc1+t5rWODb6fl86KYzdyUU/fBDjwjFs8C +X82K5TkfJhssyGdrdupUj+WotrNwQKTkhi6g51S6XY8rEosnhaGj/oV1NmyOw+Z9glT/ fbUPqJatctqb3lbrCLaVuFFOFUW2TjA1OAY6DBCs6MY2tP2DRrSefEJb5dNZMTFcu22iK 8ZeecA807F4rYrSS1ujbp/9NdjFn+/kexvA7+BY723UBam5iEdqvCBf3Yw5YAlnmw82Yh tMoxYAMQQim4KleDLKhV+qmZVfER5kg45++QZAD5ZRswD1ADSAZNQgtMFr29sN1Jhww== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796363723; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=BHzipXsDAamxgBGVWnPMNFOQckzRTuxQyxAWoxFcgXM=; b=TJS1tZWirEYoAc6eQoMbcHs3ib6wDBQc4dk+guu/dbQllDtotEtDbk7mSnD68hab+wz9 /YZ7Q0MBST8hB6MUPoj+JRMtOtvAODajcntjenPZaXfCU8IzjGxFusimChWr7yBPUFUwc boi9uP6MYm7ZlXgmx6kJSxE1Bs/DcLTHHl4meioj43svdHyE0rOJ04Ej28qgkV9oDdPwv FTWlmlaall6mp7s47qg/oMtLrjlpj4dRKV+B8Gpup5HDDpYw+EXg6bkq6cP6WG375UHOo mMoyqueQ90o00YTF+c1c0NBOM8nYzDRBO4Y0clllBoCHjoDZmRyI4dBAIwSpxsQCQuA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dxafGpkf; arc=none smtp.remote-ip=209.85.216.53 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17307606A32D for ; Fri, 4 Dec 2026 05:55:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 17307606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dxafGpkf Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-3b5e015ce05so219466a91.0 for ; Thu, 03 Dec 2026 21:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796363722; x=1796968522; darn=vger.kernel.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=BHzipXsDAamxgBGVWnPMNFOQckzRTuxQyxAWoxFcgXM=; b=dxafGpkfop50U29PIVdqoCcsrwgKwhPn1H/E/cinfxpp5V8CzJtf1CnoA0AJhGc2cm ulMQyIbfim6VNHNNbOEZwD4W6IxjPFnXPLkt0fHFeUn660TLwcmk0ngYZiWamcHyM/NV Uk6EvsUttL1T6hwFv9OKVmCAB/BzIJZpjOdscUyHnqGNPnrlyEiMJVOt/Pi2iHwlDszk 2NLMwNriwJU0sJ8PXx7J7QkE58wYCYpGrEID6QMaeV5lZMPl6mutXVGCRny+dKJPcPqf 0dCn7TN5qeuWrS7GGR4Bias8koS8Wio9DdjLiQ3r+zkfUFknM0AtWtpNvJ78QkwPzTJj cLzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796363722; x=1796968522; h=content-transfer-encoding:mime-version:references:in-reply-to :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=BHzipXsDAamxgBGVWnPMNFOQckzRTuxQyxAWoxFcgXM=; b=SHVKX8eUzDErhP0Mp/SOVBWo7qhQqI48lhiMQqC8teG6z5NT81iUeDpE4N7054jh5O BTXLZundGjWfn3Thmkwn7o1MjyD2lqUXDen1nVFnCzMhm2co1zuGXwXLEmnv4mgnKH7I Jp4OLXxemGIaCLp2yrriDcQ+o8ClpAI0opAajpRxHvx2TLF5+8QBYgZ5U7fMaFJY+lZN 9EgG6fMMzUIY0+qQP4+TStGv8b2p2V6Z3l5rrFL86X2tnCZYb/hSBVvulvLP5ZJ1ZS0Z tFUerwI6/470XvVNgqEgUajpQcjClQgQFi/DnHMIj7c3mNuKxPJ0jjzIj2eJtuoQMF+j xL7g== X-Forwarded-Encrypted: i=1; AL+hErExbafStKU4jncO6tGUBJpFm38ShtaaaltgQsZTTlN1XHD30/ImBKSCwwxJQPqfSpMYe/fTexI=@vger.kernel.org X-Gm-Message-State: APuU4Z+ldgJ1tj1UczB2UdFc3NfI54bPtF0t6kZgqL8s/t4PlZO6Uu7D uhNztSSlq6KGlwqtOsHVpdqmy4D59Mypm4L4uIKiqFlZID6iKOUEE25s X-Gm-Gg: AZFdTZcSk+/wggpOrCvtCHTP/Ktv3kdar2Kxy2vn+FKNtMk0kDO8isVt0MTS77Nb0EO nrAYJLrKk6t5CwwHAiJNDtrC+vVSImziv4cbth23ou60Sq768EqZbBPoNY82RUqD0k3FR53Gmji 8bEw7jp7exxyI347U7SU/sxXPc4hpLwecok4hPvjK/JSXxxeKHeWRGNQ5GA/kt/sVaeUD9Sy2KY 758MNvGDcAP1GhN8KoBbvj6GOrrLCavCmhtU38byrGHbNfkY7h39wbb2XrGfL6Tr7tDMS8ODMuY xNMHfDzXHs7MXabMQ6I6bib3444d1xaMuLk17ewHCGzpuvYeLypSgev/D5blvEW8lrxJIgs9qGn 7/nGLNaJebNo7d1vBr9kcXqzmTw8Ld+uWK3+GPnrHMkYAHGsp74SgukGcoZgege2zFNFqY8Ew86 5aAzOIhuFStQDiBe/O2q6INR8J12Xsvnu0jgsQMxmwxZFcoTos4bYey2foNFXDM4nlgG/tVZBRS OOvmJZzOSh7kjoqL6MGMrs4Bn37pDuP9yrbEVpnKAgn2RPCGhqgqw3KJptLAtC6iVIijmn1v4v5 Lu3s98AGmDX5yiEasL8A8yFo/H8CS5gFf7QXAcg8+IzKb5Z/C41oj9nkLOG4yyFYduLod6k6vbl VFgC802tmJuMvWAGM X-Received: by 2002:a17:90b:4c50:b0:3ad:ce24:acfa with SMTP id 98e67ed59e1d1-3b5e063eb70mr860972a91.20.1796363722236; Thu, 03 Dec 2026 21:55:22 -0800 (PST) Received: from hyunchul-PC02.lge.net ([27.122.242.71]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5ddc16c86sm2094802a91.4.2026.12.03.21.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 21:55:21 -0800 (PST) From: Hyunchul Lee To: Namjae Jeon Cc: Hyunchul Lee , Baolin Liu , ntfs@lists.linux.dev, stable@vger.kernel.org Subject: [PATCH 2/4] ntfs: stop processing after a decompression failure Date: Fri, 4 Dec 2026 14:54:40 +0900 Message-ID: <20261204055442.3619912-2-hyc.lee@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261204055442.3619912-1-hyc.lee@gmail.com> References: <20261204055442.3619912-1-hyc.lee@gmail.com> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit After a decompression failure, ntfs_read_compressed_block() logged "Skipping this compression block." and continued to the next block with "if (nr_cbs) goto do_next_cb;" using the callee-updated cur_page/cur_ofs. These describe the failure point inside the failed block, not the next block's own start, so every remaining block would be processed shifted backward and the unwritten tail of the failed block would never be filled. With cb_size < PAGE_SIZE, the only case with more than one block, the whole read covers the single page containing the failed block, so the page can never complete and processing the rest is wasted work. Stop the read (nr_cbs = 0), let the existing release loop free the unfinished pages, and return the decompression error. This also stops the read for any error exit that may be added to ntfs_decompress() in the future. Fixes: 1e9ea7e04472 ("Revert "fs: Remove NTFS classic"") Cc: stable@vger.kernel.org Signed-off-by: Hyunchul Lee --- fs/ntfs/compress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index 86381ca2b878..eb2538b4c713 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c @@ -804,7 +804,7 @@ int ntfs_read_compressed_block(struct folio *folio) */ if (err) { ntfs_error(vol->sb, - "ntfs_decompress() failed in inode 0x%llx with error code %i. Skipping this compression block.", + "ntfs_decompress() failed in inode 0x%llx with error code %i.", ni->mft_no, -err); /* Release the unfinished pages. */ for (; prev_cur_page < cur_page; prev_cur_page++) { @@ -817,6 +817,7 @@ int ntfs_read_compressed_block(struct folio *folio) pages[prev_cur_page] = NULL; } } + nr_cbs = 0; } } -- 2.43.0