From: Gianni Tedesco Subject: Re: [PATCH]: libxl: fix dom0 minimum memory threshold check Date: Fri, 22 Oct 2010 15:07:31 +0100 Message-ID: <1287756451.12843.4424.camel@qabil.uk.xensource.com> References: <1287752246.12843.4400.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org On Fri, 2010-10-22 at 15:04 +0100, Stefano Stabellini wrote: > On Fri, 22 Oct 2010, Gianni Tedesco wrote: > > libxl_set_memory_target tries to set the memory target for a given > > domain to new_target_memkb. The function includes a check to make sure > > that dom0's memory is not reduced below a minimal threshold ie. > > LIBXL_MIN_DOM0_MEM. However, this check is performed before the > > new_target_memkb variable is properly initialised - when the value is > > always zero. This means that the check always fails. Fix this by moving > > the test to happen after the proper initialisation of new_target_memkb. > > > > Signed-off-by: Gianni Tedesco > > > > I wonder what caused this block misplacement, maybe patch or hg import? > Anyway: FWIW, I blame hg, I've seen it do similar things before! Gianni