]> git.baikalelectronics.ru Git - kernel.git/commit
i3c: master: dw: fix deadlock
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Fri, 25 Jan 2019 07:29:20 +0000 (07:29 +0000)
committerBoris Brezillon <bbrezillon@kernel.org>
Sat, 26 Jan 2019 10:14:25 +0000 (11:14 +0100)
commit1f6701b0631ce6addc305603bbc1ab8c3b4003c9
treecf6b4f9bf5e9c4de75deb6d51a45088ee6b4faf0
parentb1346d41446069ea610e292b4b2d956971924e89
i3c: master: dw: fix deadlock

In dw_i3c_master_irq_handler(), we already have gotten
&master->xferqueue.lock, if we try to get the same lock again in
dw_i3c_master_dequeue_xfer(), deadlock happens.

We fix this issue by introduing dw_i3c_master_dequeue_xfer_locked()
which does all what dw_i3c_master_dequeue_xfer() does without trying
to lock &master->xferqueue.lock.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Vitor Soares <vitor.soares@synopsys.com>
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
drivers/i3c/master/dw-i3c-master.c