Starting with 4.14, ChromeOS uses the tpm driver fix from upstream for handling system shutdown. It registers a class shutdown handler that for TPM 2.0 sends the Shutdown command and set ops for the chip to null to prevent further commands. However, tpm sysfs code doesn't always properly acquire chip ops locks, which could lead to null-ifying the ops while the sysfs code accesses it.
This is not an issue for upstream code, which doesn't register any sysfs attributes for TPM 2.0. However, Chrome OS does have syfs entries in 2.0 case.
Need to fix sysfs locking to prevent races during shutdown.
Comment 1 by apronin@chromium.org
, Mar 6 2018