Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tpm: Handle negative priv->response_len in tpm_common_read()
The priv->response_length can hold the size of an response or an negative error code, and the tpm_common_read() needs to handle both cases correctly. Changed the type of response_length to signed and accounted for negative value in tpm_common_read(). Cc: [email protected] Fixes: d23d124 ("tpm: fix invalid locking in NONBLOCKING mode") Reported-by: Laura Abbott <[email protected]> Signed-off-by: Tadeusz Struk <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
- Loading branch information