ioat3: fix pq completion versus channel deallocation race
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / dma / ioat / dma_v3.c
index 189788f6351eb3851f9729d898e7a5b904937a3f..42f6f10fb0cc249b2b07854f00e556f8335029d7 100644 (file)
@@ -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 *