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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux