Bladeren bron

Merge "qcedev: ensure sequential req_done on error"

qctecmdr 2 jaren geleden
bovenliggende
commit
703d2a9e9d
1 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 4 3
      crypto-qti/qcedev.c

+ 4 - 3
crypto-qti/qcedev.c

@@ -315,8 +315,9 @@ static void req_done(unsigned long data)
 	areq = podev->active_command;
 	podev->active_command = NULL;
 
-	if (areq && !areq->timed_out) {
-		complete(&areq->complete);
+	if (areq) {
+		if (!areq->timed_out)
+			complete(&areq->complete);
 		areq->state = QCEDEV_REQ_DONE;
 	}
 
@@ -812,7 +813,7 @@ static int submit_req(struct qcedev_async_req *qcedev_areq,
 			pr_err("%s: error during manage timeout", __func__);
 
 		spin_unlock_irqrestore(&podev->lock, flags);
-		tasklet_schedule(&podev->done_tasklet);
+		req_done((unsigned long) podev);
 		if (qcedev_areq->offload_cipher_op_req.err !=
 						QCEDEV_OFFLOAD_NO_ERROR)
 			return 0;