linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/1] tpm: fix reference counting for struct tpm_chip
@ 2022-03-01  2:21 Lino Sanfilippo
  2022-03-01  2:21 ` [PATCH v8 1/1] " Lino Sanfilippo
  2022-03-01 13:56 ` [PATCH v8 0/1] " Stefan Berger
  0 siblings, 2 replies; 9+ messages in thread
From: Lino Sanfilippo @ 2022-03-01  2:21 UTC (permalink / raw)
  To: peterhuewe, jarkko, jgg
  Cc: stefanb, James.Bottomley, David.Laight, linux-integrity,
	linux-kernel, p.rosenberger, LinoSanfilippo

This patch fixes a reference count issue in the TPM core code.

Changes in v8:
- adjust names of jump labels for error cases

Changes in v7:
- adjust naming of jump labels to fit better the used label naming scheme

Changes in v6:
- rename function tpm2_add_device() to tpm_devs_add() as requested by Jarko
- add function descriptions
- fix source code formatting

Changes in v5:
- move function tpm_add_tpm2_char_device() to tpm2-space.c and rename
it to tpm2_add_device() as requested by Jarko
- put "cc" tag before all other tags 
- ensure that the error path in tpm2_add_device() always calls 
the release() function of chip->devs as requested by Jason
- reformat a code line as suggested by David Laight

Changes in v4:
- drop patch 2 (tpm: in tpm2_del_space check if ops pointer is still
valid) since James Bottomley offered a cleaner solution for this
- reimplement patch 1 to setup the /dev/tpmrm device only in case of TPM2
and avoid the installation of another action handler. This is based on a
suggestion and basic implementation done by Jason Gunthorpe.
- added tag to CC stable

Changes in v3:
- drop the patch that introduces the new function tpm_chip_free()
- rework the commit messages for the patches (style, typos, etc.)
- add fixes tag to patch 2
- add James Bottomley to cc list
- add stable mailing list to cc list

Changes in v2:
- drop the patch that erroneously cleaned up after failed installation of
  an action handler in tpmm_chip_alloc() (pointed out by Jarkko Sakkinen)
- make the commit message for patch 1 more detailed
- add fixes tags and kernel logs


Lino Sanfilippo (1):
  tpm: fix reference counting for struct tpm_chip

 drivers/char/tpm/tpm-chip.c   | 48 +++++++-----------------------
 drivers/char/tpm/tpm.h        |  1 +
 drivers/char/tpm/tpm2-space.c | 55 +++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 38 deletions(-)


base-commit: 719fce7539cd3e186598e2aed36325fe892150cf
-- 
2.35.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-03 22:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01  2:21 [PATCH v8 0/1] tpm: fix reference counting for struct tpm_chip Lino Sanfilippo
2022-03-01  2:21 ` [PATCH v8 1/1] " Lino Sanfilippo
2022-03-01 12:36   ` Stefan Berger
2022-03-01 15:39     ` Lino Sanfilippo
2022-03-03 22:41     ` Jarkko Sakkinen
2022-03-01 14:05   ` Jason Gunthorpe
2022-03-01 16:18     ` Lino Sanfilippo
2022-03-01 13:56 ` [PATCH v8 0/1] " Stefan Berger
2022-03-01 15:45   ` Lino Sanfilippo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).