From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Rob Herring <robh@kernel.org>, Kevin Cernekee <cernekee@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
Grant Likely <grant.likely@linaro.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Maxime Bizon <mbizon@freebox.fr>, Jonas Gorski <jogo@openwrt.org>,
Linux-MIPS <linux-mips@linux-mips.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] of: Fix crash if an earlycon driver is not found
Date: Mon, 10 Nov 2014 22:01:29 +0300 [thread overview]
Message-ID: <54610B89.4080004@cogentembedded.com> (raw)
In-Reply-To: <CAL_Jsq+iVfFGYEF575spQ5MaYPzo1QSfLUZP1M=TpH0+HdGS6A@mail.gmail.com>
On 11/10/2014 05:14 PM, Rob Herring 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@gmail.com>
>> Cc: <stable@vger.kernel.org> # 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...
It's actually OK to tag the patch for stable (not really send to stable),
so that that list gets automatically notified when the comment lands in the
mainline. Unless the maintainer doesn't have his own rules about stable
patches (like e.g. DaveM). Do you have alike rules?
> Rob
WBR, Sergei
next prev parent reply other threads:[~2014-11-10 19:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 8:55 [PATCH 1/2] of: Fix crash if an earlycon driver is not found Kevin Cernekee
2014-11-09 8:55 ` [PATCH 2/2] tty: serial: bcm63xx: Allow device nodes to be renamed to /dev/ttyBCM* Kevin Cernekee
2014-11-10 14:25 ` Rob Herring
2014-11-10 15:05 ` Kevin Cernekee
2014-11-10 18:30 ` Greg Kroah-Hartman
2014-11-10 19:10 ` Kevin Cernekee
2014-11-10 19:22 ` Rob Herring
2014-11-10 19:50 ` Kevin Cernekee
2014-11-11 17:35 ` Rob Herring
2014-11-11 19:50 ` Kevin Cernekee
2014-11-10 14:14 ` [PATCH 1/2] of: Fix crash if an earlycon driver is not found Rob Herring
2014-11-10 19:01 ` Sergei Shtylyov [this message]
2014-11-12 17:12 ` Grant Likely
2014-11-12 17:11 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54610B89.4080004@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=cernekee@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jogo@openwrt.org \
--cc=jslaby@suse.cz \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--cc=mbizon@freebox.fr \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).