[lkml]   [1998]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: symlinks.
On Tue, 14 Apr 1998, C. Scott Ananian wrote:

> Regarding the hullaballo about stack usage on follow_symlink depth limits:
> From my reading of the code, it does not seem as if do_follow_symlink is
> recursive at all. It is called in an for(ever) loop in lookup_dentry()
> in fs/namei.c; it only goes down one link per invocation, and pushes
> nothing onto the stack.

OK, I was wrong. The calls are recursive: lookup_dentry() calls
do_follow_link() which (in the filesystem-dependent code) calls
lookup_dentry again, which will call do_follow_link() again. So it is

I'm like to change the semantics so that the filesystem-dependant
follow_symlink() function calls lookup_dentry with follow=0.
We could then replace the recursion with a loop in do_follow_symlink().
We could then use Tarjan's algorithm to accurately detect loops without

I hope I haven't screwed anything up this time. Comments?
@ @
C. Scott Ananian: / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to

 \ /
  Last update: 2005-03-22 13:42    [W:0.057 / U:6.572 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site