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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux