[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] drivers/tpm: add xen tpmfront interface
On Tue, May 28, 2013 at 04:45:54PM -0400, Daniel De Graaf wrote: > 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@xxxxxxxxxxxxx> > >>Acked-by: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx> > > > >.. 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. > Yup, I see what you mean. Thanks for the explanation. In this case you can stick: Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> on the patch. Thanks! > This is done the same way as drivers/block/xen-blkfront.c, for > reference. > > >>+ > >>+ kfree(priv); > >>+} > >>+ > > > -- > Daniel De Graaf > National Security Agency _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |