Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Aug 2013 15:11:59 -0500
From:      Larry Rosenman <ler@lerctr.org>
To:        freebsd-current@freebsd.org
Subject:   Re: crash with cpucontrol/microcode update : Today's -CURRENT
Message-ID:  <a773626f512b741897d289b156b5ad62@webmail.lerctr.org>
In-Reply-To: <20130810200256.GI4972@kib.kiev.ua>
References:  <alpine.BSF.2.00.1308101403250.1421@borg> <20130810200256.GI4972@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help



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
> @@ -346,8 +346,7 @@ 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);
>  }
> 
> @@ -476,8 +475,7 @@ 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@lerctr.org
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688



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