mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "T.Harada" <t-harada@din.or.jp>
To: <linux-kernel@vger.kernel.org>
Cc: <t-harada@din.or.jp>
Subject: limit of following symlinks
Date: Sat, 2 Mar 2002 16:25:58 +0900	[thread overview]
Message-ID: <000901c1c1bb$7fee8df0$010210ac@maddog> (raw)

Hi,

I'm using Linux-2.4.18 on some PC.
Linux-2.4.18 limits following sequential symlinks up to 5.
(All versions Linux-2.4 seem so.)
But the code and the comment of its code are different.
The comment tells the limit is 8, but the code seems to make the limit to 5.
Which should the limit be?
Here is the code.

linux/fs/namei.c:
/*
 * This limits recursive symlink follows to 8, while
 * limiting consecutive symlinks to 40.
 *
 * Without that kind of total limit, nasty chains of consecutive
 * symlinks can cause almost arbitrarily long lookups.
 */
static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
{
        int err;
        if (current->link_count >= 5)
                goto loop;
        if (current->total_link_count >= 40)
                goto loop;


BTW, I always rewrite the code and change the limit to 20 because 5 is
too small for my project.
About Solaris, the limit is 20 and I'm happy on Solaris.
I hope the limit is grown to 20 on Linux.

I have not subscribed LKML, please CC me for reply.



                 reply	other threads:[~2002-03-02  7:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000901c1c1bb$7fee8df0$010210ac@maddog' \
    --to=t-harada@din.or.jp \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®