Files
linux/drivers
John Keeping e1cfd4533f dmaengine: pl330: fix irq race with terminate_all
[ Upstream commit e49756544a ]

In pl330_update() when checking if a channel has been aborted, the
channel's lock is not taken, only the overall pl330_dmac lock.  But in
pl330_terminate_all() the aborted flag (req_running==-1) is set under
the channel lock and not the pl330_dmac lock.

With threaded interrupts, this leads to a potential race:

    pl330_terminate_all	        pl330_update
    -------------------         ------------
    lock channel
                                entry
    lock pl330
    _stop channel
    unlock pl330
                                lock pl330
                                check req_running != -1
    req_running = -1
                                _start channel

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:38:00 +02:00
..
2018-07-22 14:28:43 +02:00
2018-07-03 11:24:56 +02:00
2018-08-22 07:46:11 +02:00
2018-01-17 09:45:27 +01:00
2018-08-24 13:09:06 +02:00
2018-07-25 11:25:10 +02:00
2018-09-15 09:45:27 +02:00