[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1222284857-32042-1-git-send-email-srajiv@linux.vnet.ibm.com>
Date: Wed, 24 Sep 2008 16:34:16 -0300
From: Rajiv Andrade <srajiv@...ux.vnet.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: akpm@...ux-foundation.org, serue@...ux.vnet.ibm.com,
safford@...son.ibm.com, debora@...ux.vnet.ibm.com,
Mimi Zohar <zohar@...ux.vnet.ibm.com>
Subject: [PATCH 1/2] TPM: Missing put_device()
In case one calling tpm_open() whilst other process is owning it,
the refcount wouldn't get 0.
This patch depends on [PATCH 3/4][resubmit] TPM: rcu locking, sent on 23 Sep 2008.
Signed-off-by: Mimi Zohar <zohar@...ux.vnet.ibm.com>
Signed-off-by: Rajiv Andrade <srajiv@...ux.vnet.ibm.com>
---
drivers/char/tpm/tpm.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index f6bbc1d..ab03b4d 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -979,6 +979,7 @@ int tpm_open(struct inode *inode, struct file *file)
if (test_and_set_bit(0, &chip->is_open)) {
dev_dbg(chip->dev, "Another process owns this TPM\n");
+ put_device(chip->dev);
return -EBUSY;
}
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists