From: Urban W. <ur...@te...> - 2001-07-27 22:58:47
|
On Fri, 27 Jul 2001, Aaron Laffin wrote: > http://uwsg.iu.edu/hypermail/linux/kernel/0101.2/1289.html > > Somebody have 2.4.7 handy? 054a:~/src/smbfs/testing/ltp/tests>uname -a Linux 054a.hojdpunkten.ac.se 2.4.7 #2 SMP Mon Jul 23 18:02:00 CEST 2001 i686 unknown 054a:~/src/smbfs/testing/ltp/tests>./symlink01 -T open01 open01 1 PASS : open(2) with (O_CREAT | O_RDWR) to create object file through symbolic link file and all writes, reads, and lseeks are ok open01 2 PASS : open(2) with O_RDWR of existing object file through symbolic link file and all writes, reads, and lseeks are ok open01 3 PASS : open(2) with (O_CREAT | O_EXCL) error is caught when creating object file through symbolic link file open01 4 PASS : open(2) error with O_RDWR is caught when processing symbolic link file which points at no object file open01 5 PASS : Nested symbolic link access condition caught. ELOOP is returned Looks ok here, as does the "eloop" testprogram. Here run on ext2, in case that makes a difference. The reason O_CREAT causes this is probably that it takes a very different path through the lookup code (fs/namei.c), compared to the non-O_CREATE case. And in the 2.4.7 patch there is this "hunk" in the O_CREATE path that probably fixed this. @@ -1137,10 +1126,10 @@ putname(nd->last.name); goto exit; } + error = -ELOOP; if (count++==32) { - dentry = nd->dentry; putname(nd->last.name); - goto ok; + goto exit; } dir = nd->dentry; down(&dir->d_inode->i_sem); /Urban |