patch-cryptlib_c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- cryptodev-linux-1.6.orig/cryptlib.c 2013-01-30 17:13:50.000000000 +0100
  2. +++ cryptodev-linux-1.6/cryptlib.c 2014-02-21 14:33:04.000000000 +0100
  3. @@ -220,7 +220,7 @@ ssize_t cryptodev_cipher_encrypt(struct
  4. {
  5. int ret;
  6. - INIT_COMPLETION(cdata->async.result->completion);
  7. + reinit_completion(&cdata->async.result->completion);
  8. if (cdata->aead == 0) {
  9. ablkcipher_request_set_crypt(cdata->async.request,
  10. @@ -243,7 +243,7 @@ ssize_t cryptodev_cipher_decrypt(struct
  11. {
  12. int ret;
  13. - INIT_COMPLETION(cdata->async.result->completion);
  14. + reinit_completion(&cdata->async.result->completion);
  15. if (cdata->aead == 0) {
  16. ablkcipher_request_set_crypt(cdata->async.request,
  17. (struct scatterlist *)src, dst,
  18. @@ -355,7 +355,7 @@ ssize_t cryptodev_hash_update(struct has
  19. {
  20. int ret;
  21. - INIT_COMPLETION(hdata->async.result->completion);
  22. + reinit_completion(&hdata->async.result->completion);
  23. ahash_request_set_crypt(hdata->async.request, sg, NULL, len);
  24. ret = crypto_ahash_update(hdata->async.request);
  25. @@ -367,7 +367,7 @@ int cryptodev_hash_final(struct hash_dat
  26. {
  27. int ret;
  28. - INIT_COMPLETION(hdata->async.result->completion);
  29. + reinit_completion(&hdata->async.result->completion);
  30. ahash_request_set_crypt(hdata->async.request, NULL, output, 0);
  31. ret = crypto_ahash_final(hdata->async.request);