On Mon, May 08, 2017 at 11:16:56AM -0700, Josh Zimmerman wrote:
> Hm, according to include/linux/pm.h,
> 
>     * It is allowed to unregister devices while the above callbacks are being
>     * executed.  However, a callback routine MUST NOT try to
> unregister the device
>     * it was called for, although it may unregister children of that device 
> (for
>     * example, if it detects that a child was unplugged while the system was
>     * asleep).
> 
> So, it seems if we want to add shutdown to class->pm, we'll need to do
> the refactoring for sysfs now to avoid the implicit lock in order to
> safely NULL out chip->ops. (Otherwise, I believe we'd need to
> unregister.)\\
> 
> I'll start work on that, but I wanted to send this email first to
> double-check that my understanding was correct and I wasn't missing an
> easier path.

Like I said, if you guard shutdown with a 'if TPM2' then the sysfs
case cannot occur..

It eventually needs to be fixed for TPM1, but a TPM2 only first step
would be OK too.

Jason

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to