mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 09:45:55 +08:00
crypto/cryptodev: fix async callback
Fix incorrect memory management for asynchronous process callbacks. Ensure callback memory is self-managed to prevent leaks or use-after-free issues. Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
@@ -262,6 +262,7 @@ struct crypt_kop
|
||||
u_int crk_flags;
|
||||
struct crparam crk_param[CRK_MAXPARAM];
|
||||
uint32_t crk_reqid;
|
||||
FAR void *crk_arg; /* callback parameter */
|
||||
};
|
||||
|
||||
#define CRK_MOD_EXP 0
|
||||
@@ -333,6 +334,7 @@ struct cryptkop
|
||||
FAR struct fcrypt *krp_fcr;
|
||||
u_int krp_flags; /* same as cryptop */
|
||||
uint32_t krp_reqid; /* distinguish tasks in asynchronous calling */
|
||||
FAR void *krp_opaque;
|
||||
};
|
||||
|
||||
/* Crypto capabilities structure */
|
||||
|
||||
Reference in New Issue
Block a user