]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: sun8i-ce - move fallback ahash_request to the end of the struct
authorOvidiu Panait <ovidiu.panait.oss@gmail.com>
Fri, 16 May 2025 12:06:56 +0000 (15:06 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 May 2025 05:48:48 +0000 (13:48 +0800)
'struct ahash_request' has a flexible array at the end, so it must be the
last member in a struct, to avoid overwriting other struct members.

Therefore, move 'fallback_req' to the end of the 'sun8i_ce_hash_reqctx'
struct.

Fixes: 56f6d5aee88d ("crypto: sun8i-ce - support hash algorithms")
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h

index 3b5c2af013d0da0dad4f3ed6b9285bcfc333156d..83df4d71905318100f184cee0ef52bbb9e09e5ea 100644 (file)
@@ -308,8 +308,8 @@ struct sun8i_ce_hash_tfm_ctx {
  * @flow:      the flow to use for this request
  */
 struct sun8i_ce_hash_reqctx {
-       struct ahash_request fallback_req;
        int flow;
+       struct ahash_request fallback_req; // keep at the end
 };
 
 /*