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
|