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/