Skip to content
Commit fbe543b4 authored by Andrew Liu's avatar Andrew Liu Committed by Grant Likely
Browse files

Fix a potential issue in mpc52xx uart driver



mpc52xx_uart_int and __uart_put_char both try to acquire the
port->lock. Therefore the function sequence of:

mpc52xx_uart_int--> ...-->flush_to_ldisc-->...-->__uart_put_char

can potentially trigger a deadlock. To avoid this deadlock a fix
similar to that found in the 8250.c serial driver is applied. The
deadlock is avoided by releasing the lock before pushing a buffer
and reacquiring it when completed.

Signed-off-by: default avatarAndrew Liu <shengping.liu@windriver.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 80791be1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment