From mboxrd@z Thu Jan 1 00:00:00 1970 From: chao@kernel.org (Chao Yu) Date: Sun, 18 Aug 2019 20:29:53 +0800 Subject: [PATCH v3 RESEND] staging: erofs: fix an error handling in erofs_readdir() In-Reply-To: <20190818032111.9862-1-hsiangkao@aol.com> References: <20190818030109.GA8225@hsiangkao-HP-ZHAN-66-Pro-G1> <20190818032111.9862-1-hsiangkao@aol.com> Message-ID: 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 at 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,