On Wed, Apr 13, 2016 at 09:58:05AM +0300, Jarkko Sakkinen wrote: > > > It prevents everything including the kernel from issuing a command > > ^^^^^^^^^^^^^^^^^^^^ > > > > That lock is not used to exclude kernel access. Read lock is only taken > > for the user space device in tpm-dev.c. > > My bad. For the in-kernel API it is taken through tpm_find_get().
Right. At this point any thing that can run in-kernel concurrently with the write exclusion is a kernel bug. Those places will need to grab the read side of the lock. Jason