lkml.org 
[lkml]   [2017]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tpm: Add explicit chip->ops locking for sysfs attributes.
On Tue, Nov 21, 2017 at 12:13:23AM +0200, Jarkko Sakkinen wrote:
> On Thu, Nov 16, 2017 at 01:25:01PM -0800, Guenter Roeck wrote:
> > Add explicit chip->ops locking for all sysfs attributes.
> > This lets us support those attributes on tpm2 devices.
> >
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > drivers/char/tpm/tpm-chip.c | 4 --
> > drivers/char/tpm/tpm-sysfs.c | 125 ++++++++++++++++++++++++++++++++-----------
> > 2 files changed, 93 insertions(+), 36 deletions(-)
>
> I think the patch looks ok (with a quick skim) as code change. We need
> it. It should have been already done. Thanks for doing this.
>
> I don't digest the commit message.
>
> You should just to explain why this change needs to be done in order to
> support sysfs attributes with TPM 2.0 devices and not speculate how it
> will be used in future commits.
>

How about the following ?

"tpm: Enable sysfs support for TPM2 devices

Access to chip->ops on TPM2 devices requires an explicit lock,
since the pointer is set to NULL in tpm_class_shutdown().
Implement that lock for sysfs access functions and enable sysfs
support for TPM2 devices."

Thanks,
Guenter

\
 
 \ /
  Last update: 2017-11-20 23:45    [W:0.703 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site