diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-11-19 17:11:03 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-11-19 23:21:03 -0700 |
commit | 49954c1567cb0d70d28bb5512d471dc5bd4e2c3f (patch) | |
tree | c64b4585518028b5c8ae749b93d9f560d536f649 /drivers/dma/ioat/dma_v3.c | |
parent | 7b3cc2b1fc2066391e498f3387204908c4eced21 (diff) | |
download | lwn-49954c1567cb0d70d28bb5512d471dc5bd4e2c3f.tar.gz lwn-49954c1567cb0d70d28bb5512d471dc5bd4e2c3f.zip |
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>
Diffstat (limited to 'drivers/dma/ioat/dma_v3.c')
-rw-r--r-- | drivers/dma/ioat/dma_v3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index 189788f6351e..42f6f10fb0cc 100644 --- a/drivers/dma/ioat/dma_v3.c +++ b/drivers/dma/ioat/dma_v3.c @@ -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 * |