Re: [PATCH RESEND v3] tpm: fix an invalid condition in tpm_common_poll

2019-03-26 Thread Jarkko Sakkinen
On Tue, Mar 26, 2019 at 08:58:28AM -0700, Tadeusz Struk wrote: > Hi Jarkko, > On 3/25/19 7:09 AM, Jarkko Sakkinen wrote: > > It is still missing the comment I asked to add. Otherwise, it is good. > > > > Sorry, I didn't see your email with the suggestion earlier. > To be honest I'm not sure if

Re: [PATCH RESEND v3] tpm: fix an invalid condition in tpm_common_poll

2019-03-26 Thread Tadeusz Struk
Hi Jarkko, On 3/25/19 7:09 AM, Jarkko Sakkinen wrote: > It is still missing the comment I asked to add. Otherwise, it is good. > Sorry, I didn't see your email with the suggestion earlier. To be honest I'm not sure if this comment adds much value, or if it is even correct. The poll doesn't

Re: [PATCH RESEND v3] tpm: fix an invalid condition in tpm_common_poll

2019-03-25 Thread Jarkko Sakkinen
On Fri, Mar 22, 2019 at 05:59:17PM +0200, Jarkko Sakkinen wrote: > On Fri, Mar 22, 2019 at 07:38:58AM -0700, Tadeusz Struk wrote: > > The poll condition should only check response_length, > > because reads should only be issued if there is data to read. > > The response_read flag only prevents

Re: [PATCH RESEND v3] tpm: fix an invalid condition in tpm_common_poll

2019-03-22 Thread Jarkko Sakkinen
On Fri, Mar 22, 2019 at 07:38:58AM -0700, Tadeusz Struk wrote: > The poll condition should only check response_length, > because reads should only be issued if there is data to read. > The response_read flag only prevents double writes. > The problem was that the write set the response_read to

[PATCH RESEND v3] tpm: fix an invalid condition in tpm_common_poll

2019-03-22 Thread Tadeusz Struk
The poll condition should only check response_length, because reads should only be issued if there is data to read. The response_read flag only prevents double writes. The problem was that the write set the response_read to false, enqued a tpm job, and returned. Then application called poll which