[Fwd: Re: [Unionfs] string constant bug]

Jeremy Huntwork jhuntwork at linuxfromscratch.org
Thu Sep 22 05:57:24 PDT 2005


FYI

-------- Original Message --------
Subject: Re: [Unionfs] string constant bug
Date: Thu, 22 Sep 2005 13:11:49 +0200
From: Klaus Knopper <unionfs at knopper.net>
Organization: Knopper Networks
To: hooanon05 at yahoo.co.jp
CC: unionfs at fsl.cs.sunysb.edu
References: <E1EI2Xb-0000wS-8i at jroun>

Hello Junjiro,

On Wed, Sep 21, 2005 at 08:13:31PM +0900, hooanon05 at yahoo.co.jp wrote:
> 
> After experiencing many assertion fails, I have found a bug.
> unionfs has become pretty stable after fixing this bug.
> I am using unionfs with writable nfs branches and i have modified some
> other points.
> 
> 
> Junjiro Okajima
> 
> 
> --- unionfs-20050920-1539/inode.cO	2005-09-21 04:39:03.000000000 +0900
> +++ unionfs-20050920-1539/inode.c	2005-09-21 20:10:16.819341832 +0900
> @@ -41,7 +41,7 @@
>  	hidden_dentry = dtohd(dentry);
>  
>  	/* check if whiteout exists in this branch, i.e. lookup .wh.foo first */
> -	name = KMALLOC(dentry->d_name.len + sizeof(".wh"), GFP_UNIONFS);
> +	name = KMALLOC(dentry->d_name.len + sizeof(".wh."), GFP_UNIONFS);

I can't believe this. I have been reading that special part of inode.c
several times during my 3 week debugging session, and did not notice the
"off by one", maybe because the last byte of "name" is overwritten with
a zero later. Also, I was searching more for uninitialized pointers or
race conditions.

Congratulations, it seems that you have just solved a LOT of the
unionfs-related problems I had in Knoppix (especially when overwriting
files multiple times, which was probably just a problem with whiteout
filename generation that was affected by the wrong kmalloc).

Some bugs are still pending, but at least now it looks like I can make a
new release this week.

Can I send you something for showing my appreciation of your quick bugfix?

Regards
-Klaus Knopper
_______________________________________________
unionfs mailing list
unionfs at mail.fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs




More information about the livecd mailing list