Re: [PATCH] tty: serial: msm: Move request_irq to the end of startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 07, 2017 at 11:51:25AM +0530, Neeraj Upadhyay wrote:
> Move the request_irq() call to the end of the msm_startup(),
> so that we don't handle interrupts while msm_startup() is
> running. This avoids potential races while initialization
> is in progress. 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>
> 
> Signed-off-by: Neeraj Upadhyay <neeraju@xxxxxxxxxxxxxx>

This seems reasonable.

Reviewd-by: Andy Gross <andy.gross@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux