Skip to content

Commit

Permalink
Merge tag 'tpmdd-next-v6.1-rc1' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/jarkko/linux-tpmdd

Pull tpm updates from Jarkko Sakkinen:
 "Just a few bug fixes this time"

* tag 'tpmdd-next-v6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  selftest: tpm2: Add Client.__del__() to close /dev/tpm* handle
  security/keys: Remove inconsistent __user annotation
  char: move from strlcpy with unused retval to strscpy
  • Loading branch information
Linus Torvalds committed Oct 10, 2022
2 parents 3604a7f + 2d869f0 commit ada3bfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_ppi.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ void tpm_add_ppi(struct tpm_chip *chip)
TPM_PPI_FN_VERSION,
NULL, ACPI_TYPE_STRING);
if (obj) {
strlcpy(chip->ppi_version, obj->string.pointer,
strscpy(chip->ppi_version, obj->string.pointer,
sizeof(chip->ppi_version));
ACPI_FREE(obj);
}
Expand Down
2 changes: 1 addition & 1 deletion security/keys/keyring.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void keyring_revoke(struct key *keyring);
static void keyring_destroy(struct key *keyring);
static void keyring_describe(const struct key *keyring, struct seq_file *m);
static long keyring_read(const struct key *keyring,
char __user *buffer, size_t buflen);
char *buffer, size_t buflen);

struct key_type key_type_keyring = {
.name = "keyring",
Expand Down
4 changes: 4 additions & 0 deletions tools/testing/selftests/tpm2/tpm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ def __init__(self, flags = 0):
fcntl.fcntl(self.tpm, fcntl.F_SETFL, flags)
self.tpm_poll = select.poll()

def __del__(self):
if self.tpm:
self.tpm.close()

def close(self):
self.tpm.close()

Expand Down

0 comments on commit ada3bfb

Please sign in to comment.