[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200526183213.20720-1-mario.limonciello@dell.com>
Date: Tue, 26 May 2020 13:32:13 -0500
From: Mario Limonciello <mario.limonciello@...l.com>
To: Peter Huewe <peterhuewe@....de>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Jason Gunthorpe <jgg@...pe.ca>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
Mario Limonciello <mario.limonciello@...l.com>,
Jeffrin Jose T <jeffrin@...agiritech.edu.in>,
Alex Guzman <alex@...man.io>
Subject: [PATCH] tpm: Revert "tpm: fix invalid locking in NONBLOCKING mode"
This reverts commit d23d12484307b40eea549b8a858f5fffad913897.
This commit has caused regressions for the XPS 9560 containing
a Nuvoton TPM.
As mentioned by the reporter all TPM2 commands are failing with:
ERROR:tcti:src/tss2-tcti/tcti-device.c:290:tcti_device_receive()
Failed to read response from fd 3, got errno 1: Operation not permitted
The reporter bisected this issue back to this commit which was
backported to stable as commit 4d6ebc4.
Cc: Jeffrin Jose T <jeffrin@...agiritech.edu.in>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206275
Fixes: d23d124 ("tpm: fix invalid locking in NONBLOCKING mode")
Reported-by: Alex Guzman <alex@...man.io>
Signed-off-by: Mario Limonciello <mario.limonciello@...l.com>
---
drivers/char/tpm/tpm-dev-common.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c
index 87f449340202..bc9d7c7ddc01 100644
--- a/drivers/char/tpm/tpm-dev-common.c
+++ b/drivers/char/tpm/tpm-dev-common.c
@@ -61,12 +61,6 @@ static void tpm_dev_async_work(struct work_struct *work)
mutex_lock(&priv->buffer_mutex);
priv->command_enqueued = false;
- ret = tpm_try_get_ops(priv->chip);
- if (ret) {
- priv->response_length = ret;
- goto out;
- }
-
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
sizeof(priv->data_buffer));
tpm_put_ops(priv->chip);
@@ -74,7 +68,6 @@ static void tpm_dev_async_work(struct work_struct *work)
priv->response_length = ret;
mod_timer(&priv->user_read_timer, jiffies + (120 * HZ));
}
-out:
mutex_unlock(&priv->buffer_mutex);
wake_up_interruptible(&priv->async_wait);
}
@@ -211,7 +204,6 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,
if (file->f_flags & O_NONBLOCK) {
priv->command_enqueued = true;
queue_work(tpm_dev_wq, &priv->async_work);
- tpm_put_ops(priv->chip);
mutex_unlock(&priv->buffer_mutex);
return size;
}
--
2.25.1
Powered by blists - more mailing lists