From: Stefan Berger Subject: [PATCH] [TPM] Fix of a race condition in TPM backend driver Date: Wed, 22 Mar 2006 12:58:26 -0500 Message-ID: <1143050306.8409.7.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-NoW771wlgNoJLe3uElst" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=-NoW771wlgNoJLe3uElst Content-Type: text/plain Content-Transfer-Encoding: 7bit The attached patch fixes a race condition that occurs if after the backend has been removed there are still requests pending. This patch flushed all the pending requests. Signed-off-by: Stefan Berger --=-NoW771wlgNoJLe3uElst Content-Disposition: attachment; filename=tpmback_race.diff Content-Type: text/x-patch; name=tpmback_race.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c @@ -55,6 +55,7 @@ static int tpmback_remove(struct xenbus_ be->backend_watch.node = NULL; } if (be->tpmif) { + vtpm_release_packets(be->tpmif, 0); tpmif_put(be->tpmif); be->tpmif = NULL; } --=-NoW771wlgNoJLe3uElst Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-NoW771wlgNoJLe3uElst--