Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4885628pjb; Mon, 27 Jul 2020 07:35:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcR8SiVTxEsCQFFS9/8pvsyT2Vfx9G1Vjr4Q9t16ySyvlFT+BG22amlYL8EecNfI5Qq7cJ X-Received: by 2002:a17:906:a456:: with SMTP id cb22mr6266387ejb.66.1595860530490; Mon, 27 Jul 2020 07:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860530; cv=none; d=google.com; s=arc-20160816; b=l9qbUVIp2TeIyARLipg7HiTC1HFYj/NOTQX+EkaM2/kkQiW/+SV13c7kOksC/tmq91 UaLPuQZ4hBLbpjFHAV6hLeiQreqXydOJqvFDbxQWN8aE6ykoTesNPpuKFu23eQbX/Esk ynPkpkyKXK3ICPAQYeVxMJscfU48jvdAOU5yHiPIeaq4DZ8DIyDSu5BSUd8NPURpLPu2 SoQgW0PKtYktlTy/BVSnikB5rYo+fNGVjPQxMZqFWXOSIz23K8Oir7c3Gyo+lz/B6uzT 23oWoSAuSd7pd07oPYCx26WA6VzV6arE2tIMW2jNUo7ELl5Me9CMDg0p/LoE9pcINQ28 98Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bg4cGsF+52KfODU1IPfoD+8S3ch4Zw5y/xKcG7B7u9U=; b=HCyvkrU2iAi0HgKQM2GZJh2F78SiFMZn1mUawCIQM2UvDePo1W4++RUHG8kAY2ApXs PNlfaowRS3kSg6BXC4FBkoMCeJi2XSchl0Thz3tSV2ZJPNhjyGp8gJr+QP5anL/1RFhe 2htfkm8+LyZnfXNvmetoq+QGmmL/hA5MldMo6QICYxzkVhhUGnt2VYti++ilTdFurR2Z 6lGYbsvS7sdWvdKNOrZwjLdDvVOqQGs7SK9FunkHd3dCXMA1oCRt/OenBu7qusrMIj4l ABv22e3O7bm152bc5ci1TEoKEEGf2rzlAA3OCgOxQAuIZsWGc/0RZvPDL/+L9rhrRl8B wrlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lJkptTPn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si2286248eji.335.2020.07.27.07.35.08; Mon, 27 Jul 2020 07:35:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lJkptTPn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731480AbgG0OcC (ORCPT + 99 others); Mon, 27 Jul 2020 10:32:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:47796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731435AbgG0OTp (ORCPT ); Mon, 27 Jul 2020 10:19:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E1D620825; Mon, 27 Jul 2020 14:19:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859585; bh=s5Q4ctpRsBm8oESX+lpNjsYimsvbDT/V1ZnkvyV0PMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lJkptTPnTVogYm70HpjH0PwTQcCHfu65O/TlHlv7+tO0lhV8eeH6WcOUPsjK9fw79 SlFil32a6PNbWbPjTtY2ay7En8nGbTTuR30DvHVbK74wltBYSB98RXKnSGuEgPumNp hfXtEb/nk1KvJIaB9Ob3EuMxHV3k9j9VnRuQle3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sungjong Seo , Namjae Jeon Subject: [PATCH 5.7 028/179] exfat: fix wrong hint_stat initialization in exfat_find_dir_entry() Date: Mon, 27 Jul 2020 16:03:23 +0200 Message-Id: <20200727134934.039735126@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Namjae Jeon commit d2fa0c337d97a5490190b9f3b9c73c8f9f3602a1 upstream. We found the wrong hint_stat initialization in exfat_find_dir_entry(). It should be initialized when cluster is EXFAT_EOF_CLUSTER. Fixes: ca06197382bd ("exfat: add directory operations") Cc: stable@vger.kernel.org # v5.7 Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon Signed-off-by: Greg Kroah-Hartman --- fs/exfat/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -1160,7 +1160,7 @@ found: ret = exfat_get_next_cluster(sb, &clu.dir); } - if (ret || clu.dir != EXFAT_EOF_CLUSTER) { + if (ret || clu.dir == EXFAT_EOF_CLUSTER) { /* just initialized hint_stat */ hint_stat->clu = p_dir->dir; hint_stat->eidx = 0;