Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp684927pxb; Tue, 5 Apr 2022 18:42:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6MMCiblFUmZgHKJL/Gtpit/0dWXkNJKihJGllBZ5J6Tj4Erm1ygwVXyBPomJ/O64tnQzC X-Received: by 2002:a05:6402:b3a:b0:41c:dcf9:ca65 with SMTP id bo26-20020a0564020b3a00b0041cdcf9ca65mr6310883edb.208.1649209373230; Tue, 05 Apr 2022 18:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209373; cv=none; d=google.com; s=arc-20160816; b=n2awYp5lGIrXJiTc/cb6eLOaPx3phM812+qThBtURTFyuvisMSwCT+LR84nfcHKUJ/ n+7ib9uAaDcqOnF/W3CR7Il4wbLmCeOCfF6+OcAd9lyeixm0sl98VIwkpAA0BWr/9Utn wAzMdREyor4aHBCwShVGacUqrqevRN0hF3z3ucFQ/Xrrl/nsOcbklq8oWSrL0xsl7rrb gPEYyc+wLxhTzunDqH+TdbeEiuHJcn7sOlndxAFXZMFzbZtBJ9PUUZicyvTpISpUmQdR OxU8W6AGBUlkDHlff+QfLsN0K+wCd63nN+5ho3wO5dTyPsh6C+eLTvFxFEpm5g0CCs/A H03Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5qsDZTVpj9vVSAjKbMfzRGgg8UNlHevrwvmi1ShmNoc=; b=Tu3HBeDS3hbLmlgGqtq7qcXLfvrgy5DXOMd1mhFEgJZpDEVqMjHYOV6JUrR9tEtFgD WfFyJTU1p8ffKe2uBc51hrkwkVB2/whiMWyG5hEQMhZRePyOuLFc1TSA44BUHbLsczxR 2tq6gIUUbAgfPqT1sBh5rslNU3AevSZEV8+ctrLrltb+bC5YAD1UWdiMaseYrm1vbqlk FE+dW/Av5aMclDH2lE92fZ/iJBzSzGHknqHKcHYNpTxi6rMEzXReizRzEKsDqApUZUq7 bfXpZRkrP8OdKMEnXv37LlV9u+++Q3dkVwHs/gXznnjsaTLSXEqAV4Hcgt0MD96QNREI Irpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uDeuFo4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a50d9cc000000b0041904b21a46si8846582edj.281.2022.04.05.18.42.24; Tue, 05 Apr 2022 18:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uDeuFo4t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354867AbiDELOe (ORCPT + 99 others); Tue, 5 Apr 2022 07:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237944AbiDEI3w (ORCPT ); Tue, 5 Apr 2022 04:29:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94431CFEA; Tue, 5 Apr 2022 01:21:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F204260FF5; Tue, 5 Apr 2022 08:21:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AE3BC385A0; Tue, 5 Apr 2022 08:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146888; bh=Tep2vIuVDQsBDq9li1VXsakPXRUUageVRqxJj3lG7YE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uDeuFo4tHpbNSTViSiwtGD5sgddOKMIJmfGzWB7T0QnK2sLgh/yEUQ5mEa3q/kS9A nyh+APLaddHbF5zHvLJtFsdQ5LSkWu25doVlfcKFeQ5XMNKnK4JMyy3OHVDyLYarbH cxcEJ9LCv1WYnO/j3o5eCxVGosCSgC7f4XgNpo0U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.17 0886/1126] f2fs: compress: fix to print raw data size in error path of lz4 decompression Date: Tue, 5 Apr 2022 09:27:13 +0200 Message-Id: <20220405070433.536005033@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Yu [ Upstream commit d284af43f703760e261b1601378a0c13a19d5f1f ] In lz4_decompress_pages(), if size of decompressed data is not equal to expected one, we should print the size rather than size of target buffer for decompressed data, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/compress.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index d0c3aeba5945..3b162506b269 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -314,10 +314,9 @@ static int lz4_decompress_pages(struct decompress_io_ctx *dic) } if (ret != PAGE_SIZE << dic->log_cluster_size) { - printk_ratelimited("%sF2FS-fs (%s): lz4 invalid rlen:%zu, " + printk_ratelimited("%sF2FS-fs (%s): lz4 invalid ret:%d, " "expected:%lu\n", KERN_ERR, - F2FS_I_SB(dic->inode)->sb->s_id, - dic->rlen, + F2FS_I_SB(dic->inode)->sb->s_id, ret, PAGE_SIZE << dic->log_cluster_size); return -EIO; } -- 2.34.1