[syslinux] [PATCH] fix for boot crash of syslinux-4.xx

Matt Fleming matt at console-pimps.org
Fri Jul 6 06:22:53 PDT 2012


On Fri, 2012-07-06 at 09:55 +0200, Geert Stappers wrote:
> On Mon, Feb 20, 2012 at 01:00:59PM -0800, H. Peter Anvin wrote:
> > On 10/21/2011 12:19 AM, Jan Safrata wrote:
> > > 
> > > 
> > > Dissecting syslinux source code reveals, that the problem is within
> > >   core/fs/cache.c
> > > function cache_init(), where seems to be an invalid pointer used to store an
> > > initial value - following patch fixes the problem by commenting out the
> > > offending line, that seems not to be needed anyway:
> > > 
> > > --- syslinux-4.04/core/fs/cache.c-orig	2011-04-18 23:24:17.000000000 +0200
> > > +++ syslinux-4.04/core/fs/cache.c	2011-09-29 10:54:46.000000000 +0200
> > > @@ -40,7 +40,9 @@ void cache_init(struct device *dev, int
> > >      cache = dev->cache_head + 1; /* First cache descriptor */
> > >  
> > >      head->prev  = &cache[dev->cache_entries-1];
> > > -    head->next->prev = dev->cache_head;
> > > +    /* following line crashes on some hw - NULL dereference? */
> > > +    /* head->next->prev = dev->cache_head; */
> > > +    /* it should not be needed anyway, since following loop does it too */
> > >      head->block = -1;
> > >      head->data  = NULL;
> > > 
> > > With that patch, syslinux works perfectly on the atom based embedded board as
> > > well as on general pc.
> > > 
> > 
> > Thanks for the reminder... I will look into it.
> > 
> 
> I'm bringing this up because in the previous reminder asked
> the submitter to ACK or NACK the patch.
> 
> It could be that I missed the NACK.
> 
> But today I took time to check my git clone
> of git://git.zytor.com/syslinux/syslinux.git to see if the patch was
> accepted. But I couldn't find it in my master branch.
> 
> Neither in the branch  origin/elflink.
> 
> So I can't find an 'ACK' in the git tree.
> 
> 
> What will be the answer to the original patch posting?

This looks like the correct fix to me, although there's no need to
include the comment about "the following line crashes on some hw".
Simply deleting the buggy line is OK.

Jan, could you resubmit the patch with the same changelog and without
the commented lines? I'll apply it to my elflink branch and get Peter to
pull it into the 4.06 branch once he returns from vacation.




More information about the Syslinux mailing list