Race condition in 2.2.15 and 2.2.16

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Wed Sep 06 2000 - 12:35:08 EST


There is a race condition somewhere in linux-2.2.15 and 2.2.16 that is
demonstrated here.

Cut and save the included 'Makefile'.

Execute:
mkdir zam
mv Makefile zam
cd zam

Make sure you are in the empty directory with only "Makefile"

Execute:
while true ; do make clean ; done

The file, Makefile, will be deleted. A zero-length one will sometimes
remain in /tmp

----- Makefile -------
#
# Warning!! Put this in an EMPTY subdirectory.
#

all: foo

foo:
        touch foo

clean:
        mv Makefile /tmp
        rm -r *
        mv /tmp/Makefile .
-------------

Now I know that you don't DO things like this. Please, this is
a demonstration, specifically designed to show a problem that
sometimes occurs in much more subtle ways. This problem can
result in missing source-code files in large directory trees
after working on them for 8-10 solid hours. NotGood(tm).

Cheers,
Dick Johnson

Penguin : Linux version 2.2.15 on an i686 machine (797.90 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:26 EST