Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760154Ab3CICIz (ORCPT ); Fri, 8 Mar 2013 21:08:55 -0500 Received: from mail-vc0-f176.google.com ([209.85.220.176]:51622 "EHLO mail-vc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759621Ab3CICIx (ORCPT ); Fri, 8 Mar 2013 21:08:53 -0500 MIME-Version: 1.0 In-Reply-To: <20130309020318.GA11449@redhat.com> References: <20130308230734.GA28317@redhat.com> <20130308233041.GA32587@redhat.com> <20130308235514.GA5605@redhat.com> <20130309001917.GA6015@redhat.com> <20130309003617.GB6743@redhat.com> <20130309020318.GA11449@redhat.com> Date: Fri, 8 Mar 2013 18:08:52 -0800 X-Google-Sender-Auth: jW5XCJ4I9LyPLoGFwCMkkVdIpAY Message-ID: Subject: Re: BUG_ON(nd->inode != parent->d_inode); From: Linus Torvalds To: Dave Jones , Linus Torvalds , Linux Kernel , Al Viro Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 790 Lines: 28 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. Linus -- 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/