From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net,
xen-devel@lists.xen.org, mail@srajiv.net, tpmdd@selhorst.net,
tpmdd@sirrix.com, leosilva@linux.vnet.ibm.com,
adlai@linux.vnet.ibm.com, shpedoikal@gmail.com
Subject: Re: [PATCH v3] drivers/tpm: add xen tpmfront interface
Date: Tue, 28 May 2013 16:45:54 -0400 [thread overview]
Message-ID: <51A51782.2070406@tycho.nsa.gov> (raw)
In-Reply-To: <20130528203216.GA25602@phenom.dumpdata.com>
On 05/28/2013 04:32 PM, Konrad Rzeszutek Wilk wrote:
> On Tue, May 28, 2013 at 11:40:32AM -0400, Daniel De Graaf wrote:
>> This is a complete rewrite of the Xen TPM frontend driver, taking
>> advantage of a simplified frontend/backend interface and adding support
>> for cancellation and timeouts. The backend for this driver is provided
>> by a vTPM stub domain using the interface in Xen 4.3.
>>
>> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
>> Acked-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu>
>
> .. snip..
>> +static void ring_free(struct tpm_private *priv)
>> +{
>> + if (!priv)
>> + return;
>> +
>> + if (priv->ring_ref)
>> + gnttab_end_foreign_access(priv->ring_ref, 0,
>> + (unsigned long)priv->shr);
>> + else
>> + free_page((unsigned long)priv->shr);
>> +
>> + if (priv->chip && priv->chip->vendor.irq)
>> + unbind_from_irqhandler(priv->chip->vendor.irq, priv);
>
> You are missing:
>
> if (priv->evtchn != INVALID_EVTCHN)
> xenbus_free_evtchn(priv->xdev, priv->evtchn);
This is already handled by unbind_from_irqhandler when it calls
unbind_from_irq, which gets the event channel from the IRQ. This
should be the same event channel as priv->evtchn, and it already
calls EVTCHNOP_close on this port. Calling xenbus_free_evtchn on
the event channel again will just double-free the port.
This is done the same way as drivers/block/xen-blkfront.c, for
reference.
>> +
>> + kfree(priv);
>> +}
>> +
--
Daniel De Graaf
National Security Agency
next prev parent reply other threads:[~2013-05-28 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 15:40 [PATCH v3] drivers/tpm: add xen tpmfront interface Daniel De Graaf
2013-05-28 20:32 ` Konrad Rzeszutek Wilk
2013-05-28 20:45 ` Daniel De Graaf [this message]
2013-05-29 15:17 ` Konrad Rzeszutek Wilk
2013-06-04 12:43 ` Konrad Rzeszutek Wilk
2013-06-04 22:14 ` [tpmdd-devel] " Peter Hüwe
2013-06-05 15:15 ` Konrad Rzeszutek Wilk
2013-06-21 18:00 ` Konrad Rzeszutek Wilk
2013-07-01 21:31 ` Daniel De Graaf
2013-07-01 22:24 ` Peter Hüwe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51A51782.2070406@tycho.nsa.gov \
--to=dgdegra@tycho.nsa.gov \
--cc=adlai@linux.vnet.ibm.com \
--cc=konrad.wilk@oracle.com \
--cc=leosilva@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@srajiv.net \
--cc=shpedoikal@gmail.com \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
--cc=tpmdd@sirrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox