From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DDFCC41514 for ; Sun, 18 Aug 2019 12:30:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2527420B7C for ; Sun, 18 Aug 2019 12:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566131403; bh=v0gcBuO1hviSpiMM1PO7wDaoD+BZFcnxIpQG+kcLKoY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=q5ZGim9ftK9Y8ZepN8LxnJtTC0YfXpfjw4WQkhoxfV/J+HzbmLPNBF/FU+NiMByqP ovuoHM9SWbpQoj50x5+v37zK20QC4ZIAjTP3Kw1kz/Uc1p73HyEbWpaqSB+vMkdXIp oBOfi/y31FWV6MGFbQBHdlffwWuqSVIvFT7Iwp4Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726478AbfHRMaA (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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,