Skip to content

Commit faa7c4e

Browse files
Pranjal Ramajor Asha Kanojiyaquic-jhugo
authored andcommitted
accel/qaic: Flush the transfer list again
Before calling synchronize_srcu() we clear the transfer list, this is to allow all the QAIC_WAIT_BO callers to exit otherwise the system could deadlock. There could be a corner case where more elements get added to transfer list after we have flushed it. Re-flush the transfer list once all the holders of dbc->ch_lock have completed execution i.e. synchronize_srcu() is complete. Fixes: ff13be8 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jeffrey Hugo <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2e0904e commit faa7c4e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/accel/qaic/qaic_data.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,11 @@ void wakeup_dbc(struct qaic_device *qdev, u32 dbc_id)
18451845
dbc->usr = NULL;
18461846
empty_xfer_list(qdev, dbc);
18471847
synchronize_srcu(&dbc->ch_lock);
1848+
/*
1849+
* Threads holding channel lock, may add more elements in the xfer_list.
1850+
* Flush out these elements from xfer_list.
1851+
*/
1852+
empty_xfer_list(qdev, dbc);
18481853
}
18491854

18501855
void release_dbc(struct qaic_device *qdev, u32 dbc_id)

0 commit comments

Comments
 (0)