mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 07:04:00 +08:00
tpmdd fixes for Linux v5.5-rc6 part 2
-----BEGIN PGP SIGNATURE----- iJYEABYIAD4WIQRE6pSOnaBC00OEHEIaerohdGur0gUCXhX/xyAcamFya2tvLnNh a2tpbmVuQGxpbnV4LmludGVsLmNvbQAKCRAaerohdGur0rWzAQCWBxqWAa9FCR+O UnoTOUKxAXKS2tZ9zaiIMPUkqHxvugEAjlMkcpMERDuHX40m1WyE6Q0mPaFXxLVp yc1Wc5dTNQw= =lKXu -----END PGP SIGNATURE----- Merge tag 'tpmdd-next-20200108' of git://git.infradead.org/users/jjs/linux-tpmdd Pull more tpmd fixes from Jarkko Sakkinen: "One critical regression fix (the faulty commit got merged in rc3, but also marked for stable)" * tag 'tpmdd-next-20200108' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Handle negative priv->response_len in tpm_common_read()
This commit is contained in:
commit
b07f636fca
@ -130,7 +130,7 @@ ssize_t tpm_common_read(struct file *file, char __user *buf,
|
||||
priv->response_read = true;
|
||||
|
||||
ret_size = min_t(ssize_t, size, priv->response_length);
|
||||
if (!ret_size) {
|
||||
if (ret_size <= 0) {
|
||||
priv->response_length = 0;
|
||||
goto out;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ struct file_priv {
|
||||
struct work_struct timeout_work;
|
||||
struct work_struct async_work;
|
||||
wait_queue_head_t async_wait;
|
||||
size_t response_length;
|
||||
ssize_t response_length;
|
||||
bool response_read;
|
||||
bool command_enqueued;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user