Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3915680rwi; Sat, 22 Oct 2022 02:08:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Ec68WwyaK5l8OOdS6+6sErs35MWE9tnxPyI8/ruu63sqDD4F3rTmK2Rv6u/JTcDTG/udd X-Received: by 2002:a17:906:8451:b0:78d:d467:55a4 with SMTP id e17-20020a170906845100b0078dd46755a4mr19000552ejy.352.1666429696440; Sat, 22 Oct 2022 02:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666429696; cv=none; d=google.com; s=arc-20160816; b=zCrO4BZxLWJrlznBQK1jE16Tvi/qix7pxLXafxsxUCqq7Qhe2VN6nyNrA0or/IR81a KaPZX4MIKcg7ZIGVVUNccT1tGOYgvvmkIwwd8VfWYx31S+tWHE7GzMsxUjAtlDxZJkQa GMYocWWJfpMPjjizr5dbbI3E9iW8m2QHeY/xrUD2uPKnGnZjF+wx1p7l1DMdEKGC3d/Q K7XBM5YEXU/268wtJM0Q6Z1e0aUFn0WRKjfQchM8rF0ZSe+rg31vyNcVwG3n/nXCVH9y fxIkTxOc4h9m1R+u63Z1KFue8o2xqg++7jsxLyvsOPMtjeaw/eIMwxula2oUbqqjOaDd m+JQ== 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=J+VM+zBZxb3Vn8CGSa1yNCzIUpKgdkvXVHvjiENLezo=; b=Vl2RN7bNoC5z48v7PPNxS+lhH0LCQEbT2lYQhxtZDcox2HnQuOAlBh6zhQPtslt3zD Qq4gHEhrG0eDjdfhiKdPsRz8BaDMGwoGQp1WHfFKBPlurdEa2w5mDCSc380WBQYz/Alg h+w9ZFrCW4No0Lu9d8PQgr7ypa0TrQkqQYZJzEMOLxXlDwrlLhznNmVfVKcosGamROdc yVYwH+bMy48q43sb4jT5rVixfMuDXjypdetL6Kjh5Zm9WiRf9HegYO/XxVArnqoH4ct6 gWr/OaxJga+rRUlulZ0Tcnvj+SYgqGaCefdWdD6a7Sgdv8FsuVPC58QQxpwjSaJ5dsKf xyHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rRS426XH; 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 qa15-20020a170907868f00b0078dce385238si21362148ejc.517.2022.10.22.02.07.51; Sat, 22 Oct 2022 02:08:16 -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=rRS426XH; 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 S230513AbiJVHmn (ORCPT + 99 others); Sat, 22 Oct 2022 03:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231144AbiJVHl5 (ORCPT ); Sat, 22 Oct 2022 03:41:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8B8C15ECD8; Sat, 22 Oct 2022 00:40:39 -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 D9F4FB82E04; Sat, 22 Oct 2022 07:39:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C188C433D6; Sat, 22 Oct 2022 07:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424372; bh=uVz+BDY/wMcdakK3a2zAGCIAkzkiJQgDSwU4vNQtw5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRS426XHt2OZLw+Vi0xjGY+iRYU91EzEPTe5eFFuwtyRuw0PrYRcX4jaTdXq1SNyx hGkgys9Pd7HprdR3t8fd7bibipCftX4MD4fbg6Di0X9WAhIMIT9lo1vIhDrq03W/1J oTRLTRHL/ceWzsuDUp0q4QIQ4DQ2CFT1dc2Ars60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@kernel.org, Ye Bin , Jan Kara , Theodore Tso Subject: [PATCH 5.19 121/717] jbd2: add miss release buffer head in fc_do_one_pass() Date: Sat, 22 Oct 2022 09:20:00 +0200 Message-Id: <20221022072436.918799318@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 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 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: Ye Bin commit dfff66f30f66b9524b661f311bbed8ff3d2ca49f upstream. In fc_do_one_pass() miss release buffer head after use which will lead to reference count leak. Cc: stable@kernel.org Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20220917093805.1782845-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/jbd2/recovery.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -256,6 +256,7 @@ static int fc_do_one_pass(journal_t *jou err = journal->j_fc_replay_callback(journal, bh, pass, next_fc_block - journal->j_fc_first, expected_commit_id); + brelse(bh); next_fc_block++; if (err < 0 || err == JBD2_FC_REPLAY_STOP) break;