Messages in this thread Patch in this message | | | From | Rajiv Andrade <> | Subject | [PATCH 1/2] TPM: Missing put_device() | Date | Wed, 24 Sep 2008 16:34:16 -0300 |
| |
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@linux.vnet.ibm.com> Signed-off-by: Rajiv Andrade <srajiv@linux.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
| |