v1
2026-08-07
修复块加密后备的大 bio 死锁 · v1
使 mempool_alloc_bulk 支持可失败分配,修复 blk-crypto-fallback 处理大 WRITE bio 提交 dm-inlinecrypt 时死锁。
原始补丁链接
子 Patch(3)
1/3
mm: make mempool_alloc_from_pool() return bool
mempool_alloc_from_pool() is intentionally all-or-nothing, so make it return a bool rather than the number of elements allocated. Then make mempool_alloc_bulk() return right away if mempool_alloc_fro
2/3
mm: support fallible mempool_alloc_bulk()
To fix a deadlock, blk-crypto-fallback needs to be able to make fallible mempool_alloc_bulk() allocations. But mempool_alloc_bulk() hardcodes GFP_KERNEL and infinite retries, which differs from mempo
3/3
blk-crypto-fallback: Fix deadlock when encrypting large bio in dm layer
Encrypting a large bio with more than BIO_MAX_VECS pages can still deadlock, even after it was attempted to be fixed by commit b37fbce460ad (“blk-crypto: optimize bio splitting in blk_crypto_fallback_