[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5d6ebe64-df5b-9cc5-be08-a550dec296f8@linaro.org>
Date: Thu, 6 Jan 2022 18:51:41 -0800
From: Tadeusz Struk <tadeusz.struk@...aro.org>
To: Jarkko Sakkinen <jarkko@...nel.org>,
Tadeusz Struk <tstruk@...il.com>
Cc: Jason Gunthorpe <jgg@...pe.ca>, linux-integrity@...r.kernel.org,
stable@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] tpm: Fix error handling in async work
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
Powered by blists - more mailing lists