[Unionfs] Unionfs 2.0 on 2.6.9 kernel

Beyerle Urs urs.beyerle at psi.ch
Wed Aug 15 02:52:42 EDT 2007


Erez Zadok wrote:
> In message <46B9C360.6040102 at psi.ch>, Beyerle Urs writes:
>> Erez Zadok wrote:
>>> In message <46B97EA2.4040806 at psi.ch>, Beyerle Urs writes:
>>> [...]
>>>> [...]
>>>>
>>>> I even get a kernel panic:
>>>>
>>>> Aug  8 10:24:14 tux40 kernel: Unable to handle kernel NULL pointer dereference at virtual 
>>> That sounds pretty simple to fix.  Could you please file a bugzilla report?
>>>
>>> Thanks,
>>> Erez.
>>
>> It's now in bugzilla:
>> https://bugzilla.filesystems.org/show_bug.cgi?id=583
>>
>> Thanks!
>>
>> 	Urs
> 
> Fixed and will be in the next release.  Apply this patch on top of 2.1 for
> 2.6.9-final.
> 
> Cheers,
> Erez.
> 
> ##############################################################################
> 
> diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
> index 6814949..2278d4e 100644
> --- a/fs/unionfs/super.c
> +++ b/fs/unionfs/super.c
> @@ -658,7 +658,7 @@ out_no_change:
>  	}
>  
>  	/* (re)allocate space for new pointers to lower dentry */
> -	oldsize = cur_branches * sizeof(struct unionfs_data);
> +	oldsize = max_branches * sizeof(struct unionfs_data);
>  	size = new_branches * sizeof(struct unionfs_data);
>  	new_data = krealloc2(oldsize, tmp_data, size, GFP_KERNEL);
>  	if (!new_data) {
> @@ -666,7 +666,7 @@ out_no_change:
>  		goto out_release;
>  	}
>  	/* allocate space for new pointers to lower paths */
> -	oldsize = cur_branches * sizeof(struct path);
> +	oldsize = max_branches * sizeof(struct path);
>  	size = new_branches * sizeof(struct path);
>  	new_lower_paths = krealloc2(oldsize, tmp_lower_paths, size, GFP_KERNEL);
>  	if (!new_lower_paths) {


Hi Erez and Andrew,

looks good. No problem so far.

Thanks!

	Urs




More information about the unionfs mailing list