]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:10 +0000 (11:05 +0100)
[ Upstream commit c822831b426307a6ca426621504d3c7f99765a39 ]

'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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h

index cec781d5063c15675feff2dd0cfd7d63148c2cef..d87d482cf73bae8de94c811a1a83ad9aeb313daf 100644 (file)
@@ -296,8 +296,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
 };
 
 /*