Re: "while :; do mkdir;cd mkdir;done" [2.1.71] fix

Andrea Arcangeli (
Wed, 10 Dec 1997 11:00:56 +0100 (CET)

On Wed, 10 Dec 1997, Guest section DW wrote:

>: From: Andrea Arcangeli <>
>: #!/bin/sh
>: while :; do mkdir foo; cd foo; done
>: create a full pathname that exceed a page memory (do_getname() return
>: -ENAMETOOLONG), so can' t be referenced in any way and so can' t be
>: deleted from rm -r etc...
>: PS. How can force the deleting of a tree created without the patch?
>An old and well-known problem.
>The tree can be deleted by deltree (
>Maybe recent GNU versions of rm will do as well.

So a kernel patch is uneeded? So why James Mastros had a filesystem panic
after running the offending script? And how can be useful a tree that can'
t be reached in any way?

At least for my own system I like my patch to be allowed to run the script
and delete the PAGE_SIZE long tree with rm -r. For my system 4096
character of path are well.

Andrea[s] Arcangeli