cpm_uart_port_map not initialised before serial console setup

Laurent Pinchart laurent.pinchart at tbox.biz
Fri Jul 14 00:55:35 EST 2006


Hi everybody,

while trying to use SCC1 as a serial console, I found a bug in the cpm_uart 
driver.

The cpm_uart_port_map table is initialised by cpm_uart_count() which is called 
in cpm_uart_init() at module_init() time. cpm_uart_console_setup(), called at 
console_initcall() time, accesses cpm_uart_port_map, leading to a crash when 
using any serial port except SMC1 as the serial console.

I attached a very simple patch to fix the problem, but it might be subject to 
race conditions. Could anyone familiar with the cpm_uart driver have a look 
at it ?

Best regards,

Laurent Pinchart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpm_uart.patch
Type: text/x-diff
Size: 403 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060713/a4ed8093/attachment.patch 


More information about the Linuxppc-embedded mailing list