Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp782624pxb; Tue, 5 Apr 2022 23:07:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW1US/e6jLJuHxSsh8OGYTIdjM9LEFd6ua2zM/QWsJvg6f4URGxif8Kn0oiBVVCv8vGcQ9 X-Received: by 2002:a65:6855:0:b0:382:59e5:b6e5 with SMTP id q21-20020a656855000000b0038259e5b6e5mr5833416pgt.586.1649225240172; Tue, 05 Apr 2022 23:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649225240; cv=none; d=google.com; s=arc-20160816; b=l/A0osBowGx2lmJyJ1S9yiXqV9nAZAH3ENm9beH4Yj7XI4P/sL16sFUCHmFTXz/VYg TXNxvDE2fAswybzRFntMi61yNrcxwqABs5U/XqzaBdBloRGbQgSke8KGqtT4WkkxEZ6q sYXlF9nkNGdIwj/MuNLvlTJXsayUP8hHrs6YkL4yLn+K0q3m0Se5WT+wSGWBOUn/biUx htcY2Bto3W3oelrHlNaSsj4Px8Dymyj/dsejwDyko0oF/Z96wpbLJM2PYUeUQKNHnse0 a4KVMiYquXWzpRjUZZQcTr/I1xrqiH8BVEhDwTTafAuF5Y9FojcCm70Md6eZtRhsdjvK onSQ== 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=d7LZq9lymTCoUB9g7w6BQCN3fOCfqrT7aTq+Nkgvli8=; b=rSVpQvqJt8qlqsUeUhI1P705XZj+kHDuIst1KTL/KxAomJMJLkUEHwAiXxAg6YRV5b BZO048iWB9njWYJaYi7j36qPmFCVUF3LZTOohDwlf7KfgDYNzfLqv1BknxnQI8bIlZNE exOlfmdKteY25qVhDN/pBgf5XtGNhZQQX0hX0ta4JXgzIdFCP9kN7S2iys+oFePrniwE IfGwDPaWjb/wVrehgV//gbse7GUB74JdDvoITuDD41b/fN3DQO3WjtkMGLAfgHMazwRu NioLOTgRJ9ugbwoYuCM4eiVZtCsgJjjdP9SFNfyVo2Cyq1QrZ7BotGvMAbRf/Ln/rwhz IhLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2GMIxxJJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n25-20020a634d59000000b0039908cd7aedsi10027662pgl.147.2022.04.05.23.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2GMIxxJJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 57C6F484D49; Tue, 5 Apr 2022 22:55:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1835755AbiDFAdU (ORCPT + 99 others); Tue, 5 Apr 2022 20:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351084AbiDEKBG (ORCPT ); Tue, 5 Apr 2022 06:01:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CCC16C4A9; Tue, 5 Apr 2022 02:51:28 -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 ams.source.kernel.org (Postfix) with ESMTPS id 95347B81B76; Tue, 5 Apr 2022 09:51:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D47B4C385A2; Tue, 5 Apr 2022 09:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152286; bh=3mVceC6AcY9ncUUXgaCeHhUlEPjZyjB+lH7uocOn1Dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2GMIxxJJao/iIo6G+izykjwbFc8OECSTVrs4PqziPYc88tVtAkNB1EVX40ISjrlXK c4QPRPQwhb4yXf9KxFtZuxvFiH9tnFpSrvqq4AFkOdWQD8LYMJcOpPHbbPZFVP4qPj Z2xBm+zY39mDiJxiPdFH9j8H+/7Zhqj+mx5eq+7Q= 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.15 722/913] f2fs: compress: fix to print raw data size in error path of lz4 decompression Date: Tue, 5 Apr 2022 09:29:44 +0200 Message-Id: <20220405070401.474321389@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 58d255d3a518..6adf04725954 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -312,10 +312,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