Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753059AbcDORSy (ORCPT ); Fri, 15 Apr 2016 13:18:54 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:43185 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752671AbcDORSw (ORCPT ); Fri, 15 Apr 2016 13:18:52 -0400 Date: Fri, 15 Apr 2016 11:18:46 -0600 From: Jason Gunthorpe To: Stefan Berger Cc: tpmdd-devel@lists.sourceforge.net, jarkko.sakkinen@linux.intel.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v10 4/5] tpm: Initialize TPM and get durations and timeouts Message-ID: <20160415171846.GB21359@obsidianresearch.com> References: <1460728216-19563-1-git-send-email-stefanb@linux.vnet.ibm.com> <1460728216-19563-5-git-send-email-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460728216-19563-5-git-send-email-stefanb@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.160 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1051 Lines: 35 On Fri, Apr 15, 2016 at 09:50:15AM -0400, Stefan Berger wrote: > @@ -69,12 +73,19 @@ static ssize_t vtpm_proxy_fops_read(struct file *filp, char __user *buf, > size_t len; > int sig, rc; > > - sig = wait_event_interruptible(proxy_dev->wq, proxy_dev->req_len != 0); > + sig = wait_event_interruptible(proxy_dev->wq, > + proxy_dev->req_len != 0 || > + !(proxy_dev->state & STATE_OPENED_FLAG)); > if (sig) > return -EINTR; This hunk and related doesn't look like it belongs in this patch? Suggest just merging this into the prior patch and be done with it, not really any reason to have two patches anymore. I think everything that was brought up is taken care of now.. One last read through.. > static int vtpm_proxy_tpm_op_recv(struct tpm_chip *chip, u8 *buf, size_t count) > { > struct proxy_dev *proxy_dev = dev_get_drvdata(&chip->dev); > if (!proxy_dev) > return -EIO; Is that actually possible? It shouldn't be. If not please drop it an related. For both: Reviewed-by: Jason Gunthorpe Jason