xfs
[Top] [All Lists]

Re: TAKE - touch recursive symlink bug

To: dxm@xxxxxxxxxxxxxxxxxxxxxxx (Daniel Moore)
Subject: Re: TAKE - touch recursive symlink bug
From: "Nathan Scott" <nathans@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Jun 2000 12:10:51 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: dxm@snort (Daniel Moore) "TAKE - touch recursive symlink bug" (Jun 15, 11:46am)
References: <200006150143.LAA87962@snort.melbourne.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Jun 15, 11:46am, Daniel Moore wrote:
> Subject: TAKE - touch recursive symlink bug
> linvfs_follow_link gets called recusively, up to 32 times before
> the ELOOP checking kicks in in namei. 
> 
> Aparently 32 uio structures and other assorted cruft is just enough
> to overflow the kernel stack.
> 
> change stack allocated uio to kmalloced uio to cut down stack usage.
> 
> (I wonder if the whole uio thing could get dropped out somehow and
> avoid this overhead? a static uio would be great too if we could avoid
> an SMP race...)
> 

There's a bunch of unused fields in that structure (leftover from
IRIX port) - it may help if we blow them away?  (should do it
anyway - but will it buy us back enough stack space to no longer
need the kmalloc?)

>From a quick look, these ones look like they can safely go:
        uio_readiolog   (uchar)
        uio_writeiolog  (uchar)
        uio_limit       (xfs_off_t)
        uio_pmp         (ptr)
        uio_fp          (ptr)

perhaps others?  might be able to remove uio_copy (func ptr) and
call filldir() directly (comment says it was added during Linux
port)?

cheers.

-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>