OSDN Git Service

crypto: omap-aes - fixup aligned data cleanup
authorTero Kristo <t-kristo@ti.com>
Tue, 5 Nov 2019 14:00:59 +0000 (16:00 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Dec 2019 08:36:58 +0000 (16:36 +0800)
Aligned data cleanup is using wrong pointers in the cleanup calls. Most
of the time these are right, but can cause mysterious problems in some
cases. Fix to use the same pointers that were used with the align call.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-aes.c

index e3f2ed0..de05b35 100644 (file)
@@ -502,10 +502,10 @@ static void omap_aes_done_task(unsigned long data)
                omap_aes_crypt_dma_stop(dd);
        }
 
-       omap_crypto_cleanup(dd->in_sgl, NULL, 0, dd->total_save,
+       omap_crypto_cleanup(dd->in_sg, NULL, 0, dd->total_save,
                            FLAGS_IN_DATA_ST_SHIFT, dd->flags);
 
-       omap_crypto_cleanup(&dd->out_sgl, dd->orig_out, 0, dd->total_save,
+       omap_crypto_cleanup(dd->out_sg, dd->orig_out, 0, dd->total_save,
                            FLAGS_OUT_DATA_ST_SHIFT, dd->flags);
 
        /* Update IV output */