Re: [Nautilus-list] Cute bug.
- From: Zbigniew Chyla <cyba gnome pl>
- To: Havoc Pennington <hp redhat com>
- Cc: Ben Ford <ben kalifornia com>, Darin Adler <darin bentspoon com>, Jonathan Blandford <jrb redhat com>, nautilus-list eazel com
- Subject: Re: [Nautilus-list] Cute bug.
- Date: Wed, 18 Jul 2001 17:49:31 +0200
On Wed, 2001-07-18 at 09:41:03, Havoc Pennington wrote:
> > Only problem is that /someday/ somebody will have a legitimate
> > reason for 50 levels of symlinks. I know, it sounds silly, but so
> > did > 640k of memory at one time not that long ago . . . .
>
> I believe the kernel or libc or something actually hardcodes a limit
> as well. We could find out that limit and use it, so we wouldn't be
> adding any extra limit.
Yes, it's hardcoded in the Linux kernel:
static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
{
int err;
if (current->link_count >= 8)
goto loop;
current->link_count++;
UPDATE_ATIME(dentry->d_inode);
err = dentry->d_inode->i_op->follow_link(dentry, nd);
current->link_count--;
return err;
loop:
path_release(nd);
return -ELOOP;
}
Zbigniew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]