diff options
| author | Giovanni Cabiddu <[email protected]> | 2019-04-29 16:43:19 +0100 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2019-05-23 14:01:03 +0800 |
| commit | 92fec16d1f4d852711511844b02f5353825d1578 (patch) | |
| tree | 4eb64c2496dbda483b1ee2c5ac29937028eb6bf5 /include/linux/debugobjects.h | |
| parent | 51d33c2f05edeace67e6f7f0603dc7aa4667e9a6 (diff) | |
crypto: qat - return proper error code in setkey
If an invalid key is provided as input to the setkey function, the
function always failed returning -ENOMEM rather than -EINVAL.
Furthermore, if setkey was called multiple times with an invalid key,
the device instance was getting leaked.
This patch fixes the error paths in the setkey functions by returning
the correct error code in case of error and freeing all the resources
allocated in this function in case of failure.
This problem was found with by the new extra run-time crypto self test.
Reviewed-by: Conor Mcloughlin <[email protected]>
Tested-by: Sergey Portnoy <[email protected]>
Signed-off-by: Giovanni Cabiddu <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions