OSDN Git Service

Fix encryption on certain devices
authorKen Sumrall <ksumrall@android.com>
Tue, 9 Oct 2012 21:16:59 +0000 (14:16 -0700)
committerKen Sumrall <ksumrall@android.com>
Tue, 9 Oct 2012 21:30:00 +0000 (14:30 -0700)
commit9dedfd473dc59e0277004e5b917e4eced02c8af5
tree9099cecf47d0f27c486594518b826bf68cde39c3
parent7a3c3d462ebd58bda0ceaba9c00c385d44c13d08
Fix encryption on certain devices

There is a race in the encryption code that after it accepts the
decryption password, it tells init to kill all the processes in
class "main", then it mounts the decrypted filesystem, preps it,
and restarts the framework.  For an unknown reason on some devices,
the new framework sometimes starts up before init has killed and
reaped all the old processes.  The proper fix is to make the killing
of the old framework synchronous, so vold waits till all the
processes have died.  But with factory rom a few days away, the
much more pragmatic solution of adding a sleep of 1 second after
telling init to kill the old framework will suffice.

Bug: 7271212
Change-Id: Ie971cd04abbc6f3f6500b4acd79d3b3b26d9561c
cryptfs.c