Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1826543imm; Mon, 3 Sep 2018 10:26:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaDSUaLl3wiQNpWX8ujxE6MjwNxmRcwkDgX1lOX37LMB8buP+JZxRZcN2EuU1hsRP4oOnC9 X-Received: by 2002:a63:da56:: with SMTP id l22-v6mr25937138pgj.179.1535995582710; Mon, 03 Sep 2018 10:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995582; cv=none; d=google.com; s=arc-20160816; b=JcJMReOM0Nwu3KBC4uhKlzqA6+Ex7YYAq1L6ChRMoMRBYuN2FK6xKtIYFaPeMN0C7B TDebXIy0orXjyFHIfX33xl7Ltln30C2EQ8bZ3WmeQ78TOwXYhY1Ef07hcdn9DVbFNx5n cqeGaZlPpdtRxBsJNzT45aTbmGSeiohRJK3bfy1Gijeq0m4j4y1ZJ5KyLXCQIYoMz9YY 8uIEUZDREtkctdI+yfQPEtQ0Nvxaoto+BuVQzG1Cwl3dFDuTMmQpjtSJmrgYtXq75TvA ZRjUlZJZNQf7qMYwqDR7YuYNUTuHhn1rmgYceQtZ7KNTR2/s3xWVkoKPOLGlL+z7Dxwe qwOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=aWno8WGoWLGnzbnxCgmZAX52gfoakLBmWy/TjhI6WAI=; b=fwDu7uOG+ncrrGG6r5lzC3eJN9YErFM4Mq4Nqa7GArHmc2nfv8dkdg+25BsNebECLH NMS4dz0m5Flobr+2TUIElM6MYR0M8jWkbQ3rfEu2ZiS9AF4qkSS8OhxJxwQCQzUVFYNU hhU7YsOTqfFRhP7MQ+jdL77eOyrpLsbH4/ll9Vl0ru01xe1wu66dUKllqPsyFJi5Zgxc lITC2KUBvt2/YoR1SP4zrtemW3WecIZ3XljFyffPlmLnqtY2ul2Dlo559VOHkBeZs8Mo z92otuangFI6BXKgchRVqztfqpTHLJPY5tBRkyBeOK9vFGsHGFvSVLuATBpMuF1Gkh3O MqbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12-v6si19091002pfd.254.2018.09.03.10.26.07; Mon, 03 Sep 2018 10:26:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730544AbeICVpj (ORCPT + 99 others); Mon, 3 Sep 2018 17:45:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45536 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729531AbeICVpi (ORCPT ); Mon, 3 Sep 2018 17:45:38 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8E4B1D0A; Mon, 3 Sep 2018 17:24:31 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anatoly Trosinenko , Andreas Dilger , Eric Sandeen , Theodore Tso Subject: [PATCH 4.14 107/165] ext4: reset error code in ext4_find_entry in fallback Date: Mon, 3 Sep 2018 18:56:33 +0200 Message-Id: <20180903165700.890913716@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Sandeen commit f39b3f45dbcb0343822cce31ea7636ad66e60bc2 upstream. When ext4_find_entry() falls back to "searching the old fashioned way" due to a corrupt dx dir, it needs to reset the error code to NULL so that the nonstandard ERR_BAD_DX_DIR code isn't returned to userspace. https://bugzilla.kernel.org/show_bug.cgi?id=199947 Reported-by: Anatoly Trosinenko Reviewed-by: Andreas Dilger Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/namei.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1397,6 +1397,7 @@ static struct buffer_head * ext4_find_en goto cleanup_and_exit; dxtrace(printk(KERN_DEBUG "ext4_find_entry: dx failed, " "falling back\n")); + ret = NULL; } nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb); if (!nblocks) {