Re: [PATCH 1/2] of: Fix crash if an earlycon driver is not found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 10 Nov 2014 08:14:01 -0600
, Rob Herring <robh@xxxxxxxxxx>
 wrote:
> On Sun, Nov 9, 2014 at 2:55 AM, Kevin Cernekee <cernekee@xxxxxxxxx> wrote:
> > __earlycon_of_table_sentinel.compatible is a char[128], not a pointer, so
> > it will never be NULL.  Checking it against NULL causes the match loop to
> > run past the end of the array, and eventually match a bogus entry, under
> > the following conditions:
> >
> >  - Kernel command line specifies "earlycon" with no parameters
> >  - DT has a stdout-path pointing to a UART node
> >  - The UART driver doesn't use OF_EARLYCON_DECLARE (or maybe the console
> >    driver is compiled out)
> >
> > Fix this by checking to see if match->compatible is a non-empty string.
> >
> > Signed-off-by: Kevin Cernekee <cernekee@xxxxxxxxx>
> > Cc: <stable@xxxxxxxxxxxxxxx> # 3.16+
> 
> Thanks. I'll queue this up.
> 
> BTW, you should not add stable CC when submitting for review, but
> rather add a note for the maintainer to apply to stable. Only if a
> commit is in mainline already and not flagged for stable, then you
> send the patch with the stable tag to get the commit added to stable.
> It's a bit confusing...


Oops, since you've picked it up I'll drop it from my tree. I'll let you
send the pull req to Linus.

g.

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux