Skip to content
Commit b910e7e3 authored by Will McVicker's avatar Will McVicker Committed by William McVicker
Browse files

MetadataCrypt: fix timeout due to missing userdata dm device

We need to load the partition table before we can wait on the userdata
dm device because the kernel (as of [1] doesn't send the KOBJ_ADD uevent
until after the partition table is loaded. The new flow needs to be:

  CreateDevice() -> ioctl(DM_DEV_CREATE)
  LoadTableAndActivate() -> ioctl(DM_TABLE_LOAD)
  WaitForDevice()

This patch updates create_crypto_blk_dev() to first call
LoadTableAndActivate() before WaitForDevice().

[1] https://lore.kernel.org/all/20210804094147.459763-8-hch@lst.de/

Fixes: 156d9d22 ("Pre-create userdata metadata encryption device.")
Bug: 210737958
Test: manually test booting raven with android13-5.15
Change-Id: Iab2214a62d44ba7e53b57f2cf0f08ac06c77b4fd
parent 235d1d65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment