[PATCH] fix valid_memory_range region merging

Michael Neuling mikey at neuling.org
Tue Feb 26 04:29:28 EST 2008


In message <20080226022933.GA12270 at verge.net.au> you wrote:
> On Thu, Apr 26, 2007 at 04:50:34PM +1000, Michael Neuling wrote:
> > Check the next region we are including is type RANGE_RAM as well.
> > 
> > Signed-off-by: Michael Neuling <mikey at neuling.org>
> > ---
> > I've not actually seen this cause a problem, but it looks wrong.  We
> > should probably merge regions properly and solve this problem for real. 
> 
> Hi Michael,
> 
> appologies for this blast-from-the-past. This mail somehow
> ended up filed in the wrong place and I chanced upon it just now.
> 
> This fix does seem correct to me, though I haven't seen it cause
> any problems either. I'm happy to merge it (better late than never,
> right?) if you are still happy with it.

Sweet thanks, I'd well and truly forgotten about it.  I think it was
just a random code cleanup, so if it still applies it should be fine to
merge.

Mikey

> 
> > 
> >  kexec/kexec.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > Index: kexec-tools-testing/kexec/kexec.c
> > ===================================================================
> > --- kexec-tools-testing.orig/kexec/kexec.c
> > +++ kexec-tools-testing/kexec/kexec.c
> > @@ -96,7 +96,8 @@ int valid_memory_range(struct kexec_info
> >  		mstart = info->memory_range[i].start;
> >  		mend = info->memory_range[i].end;
> >  		if (i < info->memory_ranges - 1
> > -		    && mend == info->memory_range[i+1].start)
> > +		    && mend == info->memory_range[i+1].start
> > +		    && info->memory_range[i+1].type == RANGE_RAM)
> >  			mend = info->memory_range[i+1].end;
> >  
> >  		/* Check to see if we are fully contained */
> 
> -- 
> Horms
> 



More information about the kexec mailing list