From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85E4BC10F14 for ; Thu, 3 Oct 2019 08:41:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AA992133F for ; Thu, 3 Oct 2019 08:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570092065; bh=8Ge+ZyujNTLgQ9B791Y2buTawZiVd1kPDV0NEZDEt+w=; h=Subject:To:Cc:From:Date:List-ID:From; b=oTdgwdL9O4vC4GD4OrbqzTt/n4hoimO8yKctDUAsOgxI11MZhyaR1xllMeXwtcy/y rYrTsQNJD4wEo7vTpZHsZFWjRtHgaFIspuXlV6TOE879fx6R8Pw0k6v8gdL5kwTY8D Bv80ULCeb+xWfATz3jKOuUYnEHRNr4nC2UqRhP/o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728422AbfJCIlF (ORCPT ); Thu, 3 Oct 2019 04:41:05 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44729 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727382AbfJCIlE (ORCPT ); Thu, 3 Oct 2019 04:41:04 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0D69921B84; Thu, 3 Oct 2019 04:41:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 03 Oct 2019 04:41:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=zMyH2I JCCKp59CcVaXrSbL6s2wq7IJS6dUdTOl0Q4Bk=; b=rehkHEDMLP78HhTmIf1gdB Fjh+I1J2NXgWzQppYvdpQZvvLh+Un3YhkvW9Dw26aCamzIYN67PD0IbQ6XsAHVzG I+64gyn0ma5tM3NR9VrJTqEmIAM1HbntlhF9wTyxJ5Vsq1SDW6LtIJIKl2JkntAO W9zIUbhpHHGuapZ6IM4Kzq32aLSKc/+3qDlZQw8Q5mBwK+eYgdkPFtQpaZZlb6Gw TsmHiB9+eL8KhBSQrrM1rmH411l21kvW4dDm4pK19DyZVsKAI1XacGvItDL6yoVX tIM5NT4an2rTwiKoycHXp+6sTuRRFILyFCOkEccypiI5SpSftQOuddIe4xEQpr4w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrgeekgddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeekfedrkeeirdekledrud dtjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhmnecu vehluhhsthgvrhfuihiivgepvd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 96F71D60057; Thu, 3 Oct 2019 04:41:03 -0400 (EDT) Subject: FAILED: patch "[PATCH] staging: erofs: some compressed cluster should be submitted" failed to apply to 5.3-stable tree To: gaoxiang25@huawei.com, gregkh@linuxfoundation.org, stable@vger.kernel.org, yuchao0@huawei.com Cc: From: Date: Thu, 03 Oct 2019 10:41:02 +0200 Message-ID: <1570092062177157@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.3-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ee45197c807895e156b2be0abcaebdfc116487c8 Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Mon, 19 Aug 2019 18:34:21 +0800 Subject: [PATCH] staging: erofs: some compressed cluster should be submitted for corrupted images As reported by erofs_utils fuzzer, a logical page can belong to at most 2 compressed clusters, if one compressed cluster is corrupted, but the other has been ready in submitting chain. The chain needs to submit anyway in order to keep the page working properly (page unlocked with PG_error set, PG_uptodate not set). Let's fix it now. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Cc: # 4.19+ Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20190819103426.87579-2-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/staging/erofs/zdata.c b/drivers/staging/erofs/zdata.c index 2d7aaf98f7de..87b0c96caf8f 100644 --- a/drivers/staging/erofs/zdata.c +++ b/drivers/staging/erofs/zdata.c @@ -1307,19 +1307,18 @@ static int z_erofs_vle_normalaccess_readpage(struct file *file, err = z_erofs_do_read_page(&f, page, &pagepool); (void)z_erofs_collector_end(&f.clt); - if (err) { + /* if some compressed cluster ready, need submit them anyway */ + z_erofs_submit_and_unzip(inode->i_sb, &f.clt, &pagepool, true); + + if (err) errln("%s, failed to read, err [%d]", __func__, err); - goto out; - } - z_erofs_submit_and_unzip(inode->i_sb, &f.clt, &pagepool, true); -out: if (f.map.mpage) put_page(f.map.mpage); /* clean up the remaining free pages */ put_pages_list(&pagepool); - return 0; + return err; } static bool should_decompress_synchronously(struct erofs_sb_info *sbi,