lkml.org 
[lkml]   [2001]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Hi.
Hi.
i upgrade from 2.2.18 to 2.2.20 today and could not apply a patch that
increases the maximum number of symbolic link to follow during a lookup.

We used to change the 5 in :
if ((follow & LOOKUP_FOLLOW)
&& inode && inode->i_op && inode->i_op->follow_link) {
if (current->link_count <= 5) {
struct dentry * result;
current->link_count++;
/* This eats the base */
result = inode->i_op->follow_link(dentry, base, follow);
current->link_count--;
dput(dentry);
return result;

by 20.

But now, in 2.2.20 the code is :

if ((follow & LOOKUP_FOLLOW)
&& inode && inode->i_op && inode->i_op->follow_link) {
if (current->link_count < 25) {
struct dentry * result;
if (current->need_resched) {
current->state = TASK_RUNNING;
schedule();
}
/* This eats the base */
result = inode->i_op->follow_link(dentry, base, follow|LOOKUP_INSYMLINK);
current->link_count -= 4;
dput(dentry);
return result;

And i must admit i am not sure that changing the 25 into 100 will do the
same...
I don't understand the comment :
/*
* Yes, this really increments the link_count by 5, and
* decrements it by 4. Together with checking against 25,
* this limits recursive symlink follows to 5, while
* limiting consecutive symlinks to 25.
*
* Without that kind of total limit, nasty chains of consecutive
* symlinks can cause almost arbitrarily long lookups.
*/

what is the difference between recursive symlink and consecutive symlinks ?

Can someone explain me on an exemple ?

N. Turro

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

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