Re: crash with cpucontrol/microcode update : Today's -CURRENT

From: Larry Rosenman <ler_at_lerctr.org>
Date: Sat, 10 Aug 2013 15:11:59 -0500
On 2013-08-10 15:02, Konstantin Belousov wrote:

> Try this.
> 
> diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c
> index 742ef0db..4e5abb2 100644
> --- a/sys/dev/cpuctl/cpuctl.c
> +++ b/sys/dev/cpuctl/cpuctl.c
> _at__at_ -346,8 +346,7 _at__at_ update_intel(int cpu, cpuctl_update_args_t *args,
> struct thread *td)
>  	else
>  		ret = EEXIST;
>  fail:
> -	if (ptr != NULL)
> -		contigfree(ptr, args->size, M_CPUCTL);
> +	free(ptr, M_CPUCTL);
>  	return (ret);
>  }
> 
> _at__at_ -476,8 +475,7 _at__at_ update_via(int cpu, cpuctl_update_args_t *args,
> struct thread *td)
>  	else
>  		ret = 0;
>  fail:
> -	if (ptr != NULL)
> -		contigfree(ptr, args->size, M_CPUCTL);
> +	free(ptr, M_CPUCTL);
>  	return (ret);
>  }
Fixed it.

# service microcode_update onestart
Updating cpucodes...
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl0 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl1 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl2 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl3 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl4 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl5 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl6 
from rev 0x60c to rev 0x60f... done.
/usr/local/share/cpucontrol/m401067660F.fw: updating cpu /dev/cpuctl7 
from rev 0x60c to rev 0x60f... done.
Done.
# ^D$

-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c)     E-Mail: ler_at_lerctr.org
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
Received on Sat Aug 10 2013 - 18:12:03 UTC

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