Re: latest openjdk7 triggers kernel panic

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Thu, 26 Dec 2013 16:31:59 +0200
on 26/12/2013 16:05 Konstantin Belousov said the following:
> I provided the following patch yesterday to Peter, after the similar mail.
> 
> diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
> index e3842a3..51b60de 100644
> --- a/sys/vm/vm_map.c
> +++ b/sys/vm/vm_map.c
> _at__at_ -1207,6 +1207,7 _at__at_ charged:
>  	}
>  	else if ((prev_entry != &map->header) &&
>  		 (prev_entry->eflags == protoeflags) &&
> +		 (cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 &&
>  		 (prev_entry->end == start) &&
>  		 (prev_entry->wired_count == 0) &&
>  		 (prev_entry->cred == cred ||
> 
> But there were no core dump available, and I think that your note is also
> valid.  I do not see why cow should be cleared from the stack direction
> bits.
> 
> diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
> index e3842a3..e15e0ca 100644
> --- a/sys/vm/vm_map.c
> +++ b/sys/vm/vm_map.c
> _at__at_ -3339,7 +3340,6 _at__at_ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
>  	 * NOTE: We explicitly allow bi-directional stacks.
>  	 */
>  	orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP);
> -	cow &= ~orient;
>  	KASSERT(orient != 0, ("No stack grow direction"));
>  
>  	if (addrbos < vm_map_min(map) ||
> 

I can confirm that the patch fixes the problem for me.
Thanks!

-- 
Andriy Gapon
Received on Thu Dec 26 2013 - 13:33:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:45 UTC