[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug in readlink, canonicalize fails.
From: |
Andreas Schwab |
Subject: |
Re: Possible bug in readlink, canonicalize fails. |
Date: |
Fri, 21 Sep 2007 15:49:10 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
mpb <address@hidden> writes:
> # Create 3 symbolic links inside those directories.
> ln -s a1/a2 /tmp/a0/a2
> ln -s /tmp/a0/a2/b3 /tmp/c0/b3
> ln -s /tmp/a0/a2/a3/a4/a5 /tmp/c0/b3/b4/a5
The problem is that we are crossing the /tmp/a0/a2 symlink twice, so
canonicalize_filename_mode thinks this is a loop. But in fact the
reference comes from different symlink expansions, and the second one
uses a different way through the filesystem. Due to the way cycle_check
works this testcase only works when the offending symlink is the second,
fourth, eighth, ... one encountered. The kernel can cope because it
only errors out after a fixed number of symlink expansions, independent
of the actual nodes crossed.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."