In cryptohomed put InitializeTpmComplete on mount_thread |
||||
Issue descriptionTo avoid deadlocks (see issue 641366 ), break InitializeTpmComplete logic into several tasks, if needed, and put on mount_thread.
,
Aug 26 2016
,
Aug 26 2016
,
Aug 26 2016
* InitializePkcs11 must be called after MountTaskResetTpmContext is done, so let's trigger it from MountTaskResetTpmContext. * Adding event about taking ownership and finalizing install attributes must be done after MountTaskResetTpmContext are done, so let's just PostTask these actions as a separate task after PostTask'ing all MountTaskResetTpmContext's - it will happen in the FIFO order after they all are done. * But calling the PostTask's themselves can happen from tpm_init->worker_thread_. No need to create a separate task just for that yet (we may need to do that, if we decide to eliminate mounts_lock_ later and do all mounts accesses from mount_thread_ only).
,
Sep 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/ed76c765e79bc4eb690eb421953a92ce1ee49023 commit ed76c765e79bc4eb690eb421953a92ce1ee49023 Author: Andrey Pronin <apronin@google.com> Date: Fri Aug 26 17:47:48 2016 cryptohome: fix deadlock in InitializeTpmComplete Fixing possible deadlock: a task on mount_thread_ waiting on mounts_lock_ prevents later tasks from running, while InitializeTpmComplete holds monts_lock_ and waits on a later task. BUG= chromium:641369 TEST=cbuildbot --hwtest on monroe, peach_pit, daisy_skate test_that dut login_Cryptohome login_OwnershipNotRetaken unittest ServiceTest.NoDeadlocksInInitializeTpmComplete Change-Id: Ia7a3dcf8169fcd3ef11c9fe6406ad7839ddab8b8 Reviewed-on: https://chromium-review.googlesource.com/376818 Commit-Ready: Andrey Pronin <apronin@chromium.org> Tested-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Darren Krahn <dkrahn@chromium.org> [modify] https://crrev.com/ed76c765e79bc4eb690eb421953a92ce1ee49023/cryptohome/service.h [modify] https://crrev.com/ed76c765e79bc4eb690eb421953a92ce1ee49023/cryptohome/service.cc [modify] https://crrev.com/ed76c765e79bc4eb690eb421953a92ce1ee49023/cryptohome/service_unittest.cc
,
Sep 2 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by apronin@chromium.org
, Aug 26 2016