All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: dds@google.com, pavel@ucw.cz, shpedoikal@gmail.com, tpm@selhorst.net
Subject: + tpm-fix-suspend-and-resume-failure.patch added to -mm tree
Date: Wed, 09 Jan 2008 21:31:31 -0800	[thread overview]
Message-ID: <200801100531.m0A5VBgu006930@imap1.linux-foundation.org> (raw)


The patch titled
     TPM: fix suspend and resume failure
has been added to the -mm tree.  Its filename is
     tpm-fix-suspend-and-resume-failure.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: TPM: fix suspend and resume failure
From: David Smith <dds@google.com>

The savestate command structure was being overwritten by the result of running
the TPM_SaveState command after one run, so make it a local variable to the
function instead of a global variable that gets overwritten.

Cc: Pavel Machek <pavel@ucw.cz>
Cc: Kent Yoder <shpedoikal@gmail.com>
Cc: Marcel Selhorst <tpm@selhorst.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/char/tpm/tpm.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff -puN drivers/char/tpm/tpm.c~tpm-fix-suspend-and-resume-failure drivers/char/tpm/tpm.c
--- a/drivers/char/tpm/tpm.c~tpm-fix-suspend-and-resume-failure
+++ a/drivers/char/tpm/tpm.c
@@ -1041,12 +1041,6 @@ void tpm_remove_hardware(struct device *
 }
 EXPORT_SYMBOL_GPL(tpm_remove_hardware);
 
-static u8 savestate[] = {
-	0, 193,			/* TPM_TAG_RQU_COMMAND */
-	0, 0, 0, 10,		/* blob length (in bytes) */
-	0, 0, 0, 152		/* TPM_ORD_SaveState */
-};
-
 /*
  * We are about to suspend. Save the TPM state
  * so that it can be restored.
@@ -1054,6 +1048,12 @@ static u8 savestate[] = {
 int tpm_pm_suspend(struct device *dev, pm_message_t pm_state)
 {
 	struct tpm_chip *chip = dev_get_drvdata(dev);
+	u8 savestate[] = {
+		0, 193,		/* TPM_TAG_RQU_COMMAND */
+		0, 0, 0, 10,	/* blob length (in bytes) */
+		0, 0, 0, 152	/* TPM_ORD_SaveState */
+	};
+
 	if (chip == NULL)
 		return -ENODEV;
 
_

Patches currently in -mm which might be from dds@google.com are

tpm-fix-suspend-and-resume-failure.patch

                 reply	other threads:[~2008-01-10  5:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801100531.m0A5VBgu006930@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dds@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=shpedoikal@gmail.com \
    --cc=tpm@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.