Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2933644iog; Mon, 20 Jun 2022 07:47:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tW1zAjxpTR66rFpYmYrBrBnUhwhLkiZ17pfdNsyAljBIkbvdxDFRznjHB/7xbfWwxAxmzY X-Received: by 2002:a17:907:da2:b0:711:f408:f098 with SMTP id go34-20020a1709070da200b00711f408f098mr21257755ejc.208.1655736426804; Mon, 20 Jun 2022 07:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736426; cv=none; d=google.com; s=arc-20160816; b=eTSzpKeA/jrf8DnZLB4f3+9TRlQCDiVW6/aEA8vbbtlycdeS5IkZlutKT0r9w+OSFk B6Z4X6aRawjjJuE8XVIJRlHhgV6AwZl3cQrAnVboNIchZxS3VcY+yYNJ3iAZzU/jjOUO G0UwZBhK+DJiW++ruqNatydsstVNC0MoROzjJP+A4pGzDSU5tO4xP3BrW4xKKNVPHOuK UHpSfI0PF8a96eTT+pUoiSovndGE+sdkZ+Ulhi6Fy6ur/WW6R5OdK9oK4A74wEg1Py4j cjbldaX7sYz2dFZnpmKtPO3Tx0Wl7ty0yiREwRAjNAouJIGIuEsNpN/1r/Aek49On49K jmMw== 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=6uFKgJfawsB//VTQgxsDQyFKnW7jNBoUcuxDw5wdjas=; b=W+6A0E722hU0WriVXSMpb0FNwvNWxQ87QM6dwazsnm38JJyZgmKusFa3/a05Tu8/oI VZiB2o700ifQL8AZtGWig4acPv0JipUEf2xwG4vSoqDQ1L8sQxfAdfZ+dlKcuan3rF9J Iw/G+dpe2da0HV+1VWBaew8s+7LNXosYMmGZC8fOtYCKQzd9g8gln/UQxPrsNNm1SCJn VEuXotWl3Nb9beyTFKTjTyr8MQac4QyBapUSzaYXK41uae4W92qPPBUdha4OctHMCfWA JwQsIj3sYignulkjPtGUY7FehLXp8ApW+ixE7N/KAkhXhlzDooosQkRLNZkKhagFlUSg j7bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UsRoBfzf; 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 d4-20020a1709067a0400b0070bf25f1732si9059914ejo.155.2022.06.20.07.46.39; Mon, 20 Jun 2022 07:47:06 -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=UsRoBfzf; 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 S244412AbiFTNHF (ORCPT + 99 others); Mon, 20 Jun 2022 09:07:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244922AbiFTNEJ (ORCPT ); Mon, 20 Jun 2022 09:04:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D4D193CC; Mon, 20 Jun 2022 05:59:14 -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 71D9F61530; Mon, 20 Jun 2022 12:59:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D997C3411C; Mon, 20 Jun 2022 12:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729953; bh=FRIHHuVh15uysefwcHw6kzr8sXWetG0k9h7RAVWZX90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UsRoBfzfciZ1PJ6zJFXkJvPp5P2gOHVMVJyoXS3Ka0DGi3QyH3E/BEjTdFhqPlYCL Nl89GwS6sDiC1wF9UwxzNJUa+P7176np+dZeIT59e972x+bPVXz5nxLkjyVzyGeAAw OdZG7otTr9MYkaj9x2kfKVGlfcYIzVKNbPhquCOg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@kernel.org, Ding Xiang , Theodore Tso Subject: [PATCH 5.18 129/141] ext4: make variable "count" signed Date: Mon, 20 Jun 2022 14:51:07 +0200 Message-Id: <20220620124733.369503971@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@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.7 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: Ding Xiang commit bc75a6eb856cb1507fa907bf6c1eda91b3fef52f upstream. Since dx_make_map() may return -EFSCORRUPTED now, so change "count" to be a signed integer so we can correctly check for an error code returned by dx_make_map(). Fixes: 46c116b920eb ("ext4: verify dir block before splitting it") Cc: stable@kernel.org Signed-off-by: Ding Xiang Link: https://lore.kernel.org/r/20220530100047.537598-1-dingxiang@cmss.chinamobile.com Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/ext4/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1929,7 +1929,8 @@ static struct ext4_dir_entry_2 *do_split struct dx_hash_info *hinfo) { unsigned blocksize = dir->i_sb->s_blocksize; - unsigned count, continued; + unsigned continued; + int count; struct buffer_head *bh2; ext4_lblk_t newblock; u32 hash2;