From nobody Thu Apr 2 15:42:30 2026 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [160.30.148.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 DE21423BCEE for ; Mon, 9 Mar 2026 01:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=160.30.148.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773018580; cv=none; b=gg6RIC0l/yPcfMm0m784JVxr8WgWXriNv03SAplPl5h1vtrIDHT4BWpkFbpDK/g//D4p3ua6aQc2pNIFh3AGfjrcuiIRQ3kcz+oInc5eL+ehhK3pw5euktLlEY/miG0tvJbtzNMNoJByTYQOJQUYdeUo8B3ljlMWLvSGVgTrwKA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773018580; c=relaxed/simple; bh=X7ZGsw+fmSzUO9a/RnJY8Xab5xd6cgKdfY6Yg5WPvew=; h=Message-ID:Date:Mime-Version:From:To:Cc:Subject:Content-Type; b=XGolHdyQF25THBo5Zb+kUNfwPIUXgZSOdG6TvajSSaYXEhphscdZYck3bjjH1SAR5VZbHpE/iBezxCNyYkSHUhKNWqxUlS4a59XhnGiD8svnq2r8X+kURIBck6t7gqNegJzzWIdwWkoTqcdV4FPp7oD+7Cpiwt+zBUcZnotJ03c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=160.30.148.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4fTf6z0f18z8Xs70; Mon, 09 Mar 2026 09:09:31 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl1.zte.com.cn with SMTP id 62919PXG013932; Mon, 9 Mar 2026 09:09:25 +0800 (+08) (envelope-from fan.yu9@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid32; Mon, 9 Mar 2026 09:09:26 +0800 (CST) X-Zmail-TransId: 2afa69ae1dc63e1-427e6 X-Mailer: Zmail v1.0 Message-ID: <202603090909261904qeLJ4zFnhW7fFPmKw8sV@zte.com.cn> Date: Mon, 9 Mar 2026 09:09:26 +0800 (CST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , , , Cc: , , , , , , , Subject: =?UTF-8?B?W1BBVENIIHYyIFJFU0VORF0gdWJpZnM6IHByZXZlbnQgY29ycnVwdGVkIGRhdGEgd3JpdGUgdmlhIGVycm9yX3JlbW92ZV9mb2xpb8KgwqA=?= X-MAIL: mse-fl1.zte.com.cn 62919PXG013932 X-TLS: YES X-SPF-DOMAIN: zte.com.cn X-ENVELOPE-SENDER: fan.yu9@zte.com.cn X-SPF: None X-SOURCE-IP: 10.5.228.132 unknown Mon, 09 Mar 2026 09:09:31 +0800 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 69AE1DCB.000/4fTf6z0f18z8Xs70 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jinpeng Cui When a memory corruption event triggers memory_failure, ext4 releases references to the affected dirty pages, ensuring that no corrupted data is written to disk. However, ubifs currently lacks the error_remove_folio capabilityand therefore cannot release references to faulty private memory. As a result, corrupted data may eventually be written to flash storage. Add generic_error_remove_folio support to ubifs, preventing corrupted memory data from being persisted to flash. Signed-off-by: Jinpeng Cui Signed-off-by: Shengming Hu Signed-off-by: Fan Yu Reviewed-by: Zhihao Cheng Reviewed-by: xu xin --- Changes in v2: - Some format fixes according to https://lore.kernel.org/all/20260211173233604W9pVxv17lV3V2uYD3zCOq@zte.com.= cn/ fs/ubifs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index ca41ce8208c4..730318eb1ba8 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1635,6 +1635,7 @@ const struct address_space_operations ubifs_file_addr= ess_operations =3D { .dirty_folio =3D ubifs_dirty_folio, .migrate_folio =3D filemap_migrate_folio, .release_folio =3D ubifs_release_folio, + .error_remove_folio =3D generic_error_remove_folio, }; const struct inode_operations ubifs_file_inode_operations =3D { --=20 2.25.1