Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6c833099 authored by Neeraj Upadhyay's avatar Neeraj Upadhyay Committed by Srinivas Ramana
Browse files

tty: serial: msm: fix potential race b/w startup and irq handling



There is a potential race for tx/rx dma requests between
msm_startup() and irq handling, for cases where dmas are not
available. This results in irq path trying to do dma mapping,
resulting in data abort. For example, consider below scenario
where rx handler reads the intermediate value of dma->chan,
set in msm_request_rx_dma(), and tries to do dma mapping,
which results in data abort.

uart_port_startup()
  msm_startup()
   request_irq()
   ...
   msm_request_rx_dma()
    ...
    dma->chan = dma_request_slave_channel_reason(dev, "rx");
    <UART RX IRQ>
     msm_uart_irq()
      msm_handle_rx_dm()
       msm_start_rx_dma()
        dma->desc = dma_map_single()
         <data abort>

Change-Id: Icf5d48f2718c3c6a855ffd3d10988a93f8281d78
Signed-off-by: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
parent 04ed8080
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment