From mboxrd@z Thu Jan 1 00:00:00 1970 From: OGAWA Hirofumi Subject: Re: Intentionally corrupted vfat fs causing BUG Date: Fri, 24 Oct 2014 01:50:39 +0900 Message-ID: <8738ae91cw.fsf@devron.myhome.or.jp> References: <87h9z97aoh.fsf@devron.myhome.or.jp> <8761fo7667.fsf@devron.myhome.or.jp> <543B8BC7.1040501@nod.at> <87y4sk5pul.fsf@devron.myhome.or.jp> <543B8FA7.9000106@nod.at> <87r3yc5oqt.fsf@devron.myhome.or.jp> <5443E87A.2060207@nod.at> <87oat29551.fsf@devron.myhome.or.jp> <20141023160106.GB7996@ZenIV.linux.org.uk> <20141023161606.GC7996@ZenIV.linux.org.uk> <877fzq91ky.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain Cc: Richard Weinberger , Sami Liedes , linux-fsdevel To: Al Viro Return-path: Received: from mail.parknet.co.jp ([210.171.160.6]:44992 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752756AbaJWQul (ORCPT ); Thu, 23 Oct 2014 12:50:41 -0400 In-Reply-To: <877fzq91ky.fsf@devron.myhome.or.jp> (OGAWA Hirofumi's message of "Fri, 24 Oct 2014 01:45:49 +0900") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: OGAWA Hirofumi writes: > Al Viro writes: > >> On Thu, Oct 23, 2014 at 05:01:06PM +0100, Al Viro wrote: >> >>> Hmm... Why hadn't d_splice_alias() caught that, though? >> >> Aha. It's not namei_msdos.c part, it's namei_vfat.c one. And there >> we don't call d_splice_alias() on the affected path... >> >> OK, so your check isn't enough. What we need there is this: >> if (alias && alias->d_parent == dentry->d_parent && ...) >> Otherwise that d_move() isn't safe at all. > > Hm, sounds like I'm missing something. what case has different > ->d_parent on alias if prevented by my check? You meant the case of more complex double linked loop? -- OGAWA Hirofumi