Files
linux/drivers
John Keeping 07f4a83afb 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>
2023-05-15 08:19:15 +09:00
..
2023-05-12 16:27:16 +09:00
2023-05-12 16:28:00 +09:00
2018-07-03 18:27:19 +02:00
2018-05-30 13:19:56 +02:00
2018-06-06 18:34:12 +02:00
2018-05-30 13:19:56 +02:00
2018-02-25 11:05:55 +01:00
2023-05-12 16:57:29 +09:00
2017-09-09 17:39:41 +02:00
2018-05-25 17:06:35 +02:00
2023-05-12 17:05:02 +09:00
2023-05-12 16:37:13 +09:00
2018-07-03 18:27:19 +02:00