Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1533123ybl; Sun, 18 Aug 2019 05:31:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUYRBsG+ni+nv8bBbb/WasK999qzU+OPandeLhHwXhcSSbltR/WC+OmoPlfHMDMyVdsJIz X-Received: by 2002:a63:f91c:: with SMTP id h28mr14829668pgi.397.1566131468487; Sun, 18 Aug 2019 05:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566131468; cv=none; d=google.com; s=arc-20160816; b=NW9E3djqL6qrtMP92mL4QDHPHs/lp42rf7EIsoUGIAc3rnhTiISL4phJs3G6CbnjRD nl1LiW9ISyU2z/LW7WYJ1CeOFrusb3GHEPwHLnoeQE6+GaUVwkhzye2f+j1gY9nzzi22 QW1SueK5Ut29alMChluEB0KwYnn4YAZ61UO/n8u6UmJ/ecsZ8QQxIWH/gn/2t/S3AezA PIrlER06BhIju0lAbyvvPf01vLJ6oodyNJD9MksSqFyo8/UzYDS25n+LhjH66d7bpefK LV2F74+j6oTxBU2aWJiO7k9kIoJS+2RCInOS6qGPE8Rctbr5iUsOKXh8MI8tfNsGVhZI 1loQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eHAtC2k1gt2KkSO4Yh+w6eaEDzhCw949lBIHnAqbFII=; b=r+tsxbl0uBtRx4A/w0fHTt+BgMjYagLWCbpRZFdUSKKIZ5aM5SYLrNEa6/DwLswyyn rpLwb+Y0EmXiX4b+e9kMfZU+c6nVTxBcU9s8yJ2JYWdc05gr3xx+gRDgJqsXNw3Ntn4p kge6n4X+bdrE16GqJfAdHrvj02b5wUtGkfALFrv18c9qZB6XxwDPHF8vPdCxjbUj4kI8 ePHuKaAKYps4SP00M9ZzZJS69OUMhDcc94w3OEZf38Qza/qj4ymRtK9Xvcbe0TR3P3i+ zKK4jRgLrkcFx66UexucQvkczqmPuP1d2JBPGl7LZTwKR/BWO1Gv/8cFVh2r8JBttd6l /3BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VrUFUjME; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si7894972pga.426.2019.08.18.05.30.53; Sun, 18 Aug 2019 05:31:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=VrUFUjME; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726672AbfHRMaA (ORCPT + 99 others); Sun, 18 Aug 2019 08:30:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfHRM37 (ORCPT ); Sun, 18 Aug 2019 08:29:59 -0400 Received: from [192.168.0.101] (unknown [180.111.132.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1DAD2087E; Sun, 18 Aug 2019 12:29:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566131399; bh=v0gcBuO1hviSpiMM1PO7wDaoD+BZFcnxIpQG+kcLKoY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=VrUFUjMEpts/vzRuYKhEerx/4UgqX16CgFBSOI+pF0TAT4R+fK2iiGA/fHqmQo+/5 XNM2D7/hafRuysbTTZZkilM0jk5GCEaZRlvd+PX3qVDaeyqsoGTh+TfLzlp4s6VNAj s64ifh0Qt7uUx9GupQ/Ds3FLVaxYip545xWbZN8w= Subject: Re: [PATCH v3 RESEND] staging: erofs: fix an error handling in erofs_readdir() To: Gao Xiang , Chao Yu , Richard Weinberger , Matthew Wilcox , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-fsdevel@vger.kernel.org Cc: LKML , linux-erofs@lists.ozlabs.org, Miao Xie , Fang Wei , Gao Xiang , stable@vger.kernel.org References: <20190818030109.GA8225@hsiangkao-HP-ZHAN-66-Pro-G1> <20190818032111.9862-1-hsiangkao@aol.com> From: Chao Yu Message-ID: Date: Sun, 18 Aug 2019 20:29:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190818032111.9862-1-hsiangkao@aol.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-8-18 11:21, Gao Xiang wrote: > From: Gao Xiang > > Richard observed a forever loop of erofs_read_raw_page() [1] > which can be generated by forcely setting ->u.i_blkaddr > to 0xdeadbeef (as my understanding block layer can > handle access beyond end of device correctly). > > After digging into that, it seems the problem is highly > related with directories and then I found the root cause > is an improper error handling in erofs_readdir(). > > Let's fix it now. > > [1] https://lore.kernel.org/r/1163995781.68824.1566084358245.JavaMail.zimbra@nod.at/ > > Reported-by: Richard Weinberger > Fixes: 3aa8ec716e52 ("staging: erofs: add directory operations") > Cc: # 4.19+ > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,