Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 May 2005 06:15:27 -0400 (EDT)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Oleg Sharoiko <os@rsu.ru>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: diskless/unionfs panics 
Message-ID:  <20050501061323.X71837@mail.chesapeake.net>
In-Reply-To: <20050501114837.V649@localhost>
References:  <E1DS8Gs-000OTa-1Y@cs1.cs.huji.ac.il> <20050501034520.N71837@mail.chesapeake.net> <20050501114837.V649@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 1 May 2005, Oleg Sharoiko wrote:

>
> On Sun, 1 May 2005, Jeff Roberson wrote:
>
> JR>Where is this patch?
>
> It was quoted by Danny in his mail http://docs.freebsd.org/cgi/mid.cgi?E1DRs0M-0006E4-9a
> I sent it him privately, because I wasn't sure about the patch.

Yes, unfortunately this is only part of the problem.  The v_object can
change on a unionfs vnode leading to inconsistent results for mmap/exec.
This also causes problems for unionfs mounted on top of unionfs as the
lower vp can also change v_object fields.  This was one advantage to the
VOP based solution.  It would propagate all the way down the stack on each
access.

>
> Here it is:
> -----
> Index: union_vnops.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/fs/unionfs/union_vnops.c,v
> retrieving revision 1.131
> diff -u -r1.131 union_vnops.c
> --- union_vnops.c       13 Apr 2005 10:59:08 -0000      1.131
> +++ union_vnops.c       1 May 2005 07:50:27 -0000
> @@ -748,6 +748,9 @@
>         if (error == 0)
>                 error = VOP_OPEN(tvp, mode, cred, td, -1);
>
> +       if (error == 0)
> +               ap->a_vp->v_object = tvp->v_object;
> +
>         /*
>          * Release any locks held.
>          */
> -----
>
> I made it similar to the way it's done in nullfs. You can check my
> explanaitons quoted by Danny.
>
> --
> Oleg Sharoiko.
> Software and Network Engineer
> Computer Center of Rostov State University.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050501061323.X71837>