mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 03:06:10 +00:00
ioat3: fix pq completion versus channel deallocation race
The completion of a pq operation is notified with a null descriptor appended to the end of the chain. This descriptor needs to be visible to dma clients otherwise the client is precluded from ensuring all operations are quiesced before freeing channel resources, i.e. due to descriptor polling it may get the completion notification ahead of the interrupt delivered by the null descriptor. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
7b3cc2b1fc
commit
49954c1567
1 changed files with 2 additions and 2 deletions
|
@ -571,7 +571,7 @@ __ioat3_prep_xor_lock(struct dma_chan *c, enum sum_check_flags *result,
|
|||
dump_desc_dbg(ioat, compl_desc);
|
||||
|
||||
/* we leave the channel locked to ensure in order submission */
|
||||
return &desc->txd;
|
||||
return &compl_desc->txd;
|
||||
}
|
||||
|
||||
static struct dma_async_tx_descriptor *
|
||||
|
@ -730,7 +730,7 @@ __ioat3_prep_pq_lock(struct dma_chan *c, enum sum_check_flags *result,
|
|||
dump_desc_dbg(ioat, compl_desc);
|
||||
|
||||
/* we leave the channel locked to ensure in order submission */
|
||||
return &desc->txd;
|
||||
return &compl_desc->txd;
|
||||
}
|
||||
|
||||
static struct dma_async_tx_descriptor *
|
||||
|
|
Loading…
Reference in a new issue