Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933454Ab3CIC4h (ORCPT ); Fri, 8 Mar 2013 21:56:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49071 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760162Ab3CIC4g (ORCPT ); Fri, 8 Mar 2013 21:56:36 -0500 Date: Fri, 8 Mar 2013 21:56:31 -0500 From: Dave Jones To: Linus Torvalds , Linux Kernel , Al Viro Subject: Re: BUG_ON(nd->inode != parent->d_inode); Message-ID: <20130309025631.GA13188@redhat.com> Mail-Followup-To: Dave Jones , Linus Torvalds , Linux Kernel , Al Viro References: <20130308233041.GA32587@redhat.com> <20130308235514.GA5605@redhat.com> <20130309001917.GA6015@redhat.com> <20130309003617.GB6743@redhat.com> <20130309020318.GA11449@redhat.com> <20130309022623.GB11449@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130309022623.GB11449@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 41 On Fri, Mar 08, 2013 at 09:26:23PM -0500, Dave Jones wrote: > On Fri, Mar 08, 2013 at 06:08:52PM -0800, Linus Torvalds wrote: > > On Fri, Mar 8, 2013 at 6:03 PM, Dave Jones wrote: > > > > > > existing pathname + 'a' = fine. > > > > > > existing pathname + '/' + 'a' = boom. > > > > Good. > > > > > Looks like if I do this.. > > > > > > if (isdigit(newpath[len]) != 0) { > > > newpath[len] = '/'; > > > newpath[len+1] = 'A'; > > > newpath[len+2] = 0; > > > > > > no bug. > > > > Well, but that will never trigger. newpath[len] will always be NUL, so > > you just disabled things entirely. Use "len-1". > > > > So I don't think that did what you meant it to do. > > Fixed that up, and even double checked my sanity by printing stuff out. > > Confirmed that it's something that doesn't end in a number. I've got a hunch that it's /proc/$$/ns/uts. After 3-4 runs, that's the only common file in the last few that got mangled. I'll do some more tests, but this might be the one. Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/