Re: [PATCH v2 1/2] tpm: Fix error handling in async work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/5/22 12:05, Jarkko Sakkinen wrote:
until the user_read_timer wakes it up after 120 sec.
Make sure that error conditions also contribute to the poll mask
so that a correct error code could passed back to the caller.
I'm not sure what "making sure" means.




         tpm_put_ops(priv->chip);
-       if (ret > 0) {
+       if (ret != 0) {
What if ret < 0?

You should explain this change in the commit message. Also, consider
adding an inline comment.

As the commit message says tpm_dev_transmit() returns -EINVAL when
the given handle doesn't exist, and the tmprm can not find it.
This is not handled properly and the application gets stuck.
I will add a comment here send a new version.

--
Thanks,
Tadeusz



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux