Thread (7 messages) 7 messages, 3 authors, 2012-03-30

Re: [PATCH] tty: serial: altera_uart: Check for NULL platform_data in probe.

From: Yuriy Kozlov <hidden>
Date: 2012-03-29 21:04:07

On Thursday, March 29, 2012 12:47:11 Greg Kroah-Hartman wrote:
On Thu, Mar 29, 2012 at 09:38:55PM +0200, Tobias Klauser wrote:
quoted
On 2012-03-29 at 18:13:37 +0200, Greg Kroah-Hartman 
[off-list ref] wrote:
quoted
quoted
On Thu, Mar 29, 2012 at 09:55:27AM +0200, Tobias Klauser wrote:
quoted
From: Yuriy Kozlov <redacted>

Follow altera_jtag_uart.  This fixes a crash if there is a mistake in
the DTS.> > 
Is this something you have seen in the wild?  Is this something to be
backported to stable kernels?
Not that I know of. But nevertheless it might be worthwhile. Shall I
send the patch again with Cc: stable@kernel.org?
Nope, I can add it.

But, if this isn't something that you have seen, why is it needed to be
checked for?  What is this making work properly that isn't working
properly now?

thanks,

greg k-h
The driver is designed to use Device Tree to get hardware information, so 
platp (platform_data) is usually NULL.  platform_data is still used as a 
fallback mechanism.  The problem arises when the device is in the DT, but is 
missing a required property (address or irq).  The driver falls back to 
looking for it in the null platp and panics.  The function actually already 
checks platp for other properties later on, but under this condition it tried 
to dereference it before the null checks.

-- 
~ Yuriy Kozlov
 Pyramid Technical Consultants, Inc.
---------------------------------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help