blk-crypto-fallback: Fix deadlock when encrypting large bio in dm layer - #1126
Open
blktests-ci[bot] wants to merge 1 commit into
Open
blk-crypto-fallback: Fix deadlock when encrypting large bio in dm layer#1126blktests-ci[bot] wants to merge 1 commit into
blktests-ci[bot] wants to merge 1 commit into
Conversation
Author
|
Upstream branch: d58772d |
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 12, 2026 13:27
29ac21d to
ea2c39d
Compare
Author
|
Upstream branch: f5bbbfe |
blktests-ci
Bot
force-pushed
the
series/1144347=>linus-master
branch
from
August 12, 2026 13:34
40f28d7 to
23996c7
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 12, 2026 18:56
ea2c39d to
4082a30
Compare
Author
|
Upstream branch: 3d6d817 |
blktests-ci
Bot
force-pushed
the
series/1144347=>linus-master
branch
from
August 12, 2026 19:22
23996c7 to
1aceaca
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 13, 2026 19:18
4082a30 to
36bd7eb
Compare
Author
|
Upstream branch: 3aa1dca |
blktests-ci
Bot
force-pushed
the
series/1144347=>linus-master
branch
from
August 13, 2026 19:25
1aceaca to
43555da
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
2 times, most recently
from
August 16, 2026 18:34
d89ab11 to
fdba928
Compare
Author
|
Upstream branch: fd923b3 |
blktests-ci
Bot
force-pushed
the
series/1144347=>linus-master
branch
from
August 16, 2026 19:38
43555da to
e216f17
Compare
blktests-ci
Bot
force-pushed
the
linus-master_base
branch
from
August 17, 2026 14:10
fdba928 to
60442a3
Compare
Encrypting a large bio with more than BIO_MAX_VECS pages can still deadlock, even after it was attempted to be fixed by commit b37fbce ("blk-crypto: optimize bio splitting in blk_crypto_fallback_encrypt_bio") and commit 3d93969 ("blk-crypto: use mempool_alloc_bulk for encrypted bio page allocation"). This is because __blk_crypto_fallback_encrypt_bio() assumes that the bounce bios that it submits will eventually complete, unblocking it from allocating additional bounce bios and pages. However, dm-inlinecrypt.c calls __blk_crypto_submit_bio() from within submit_bio() itself. In this case, the recursive submit_bio() simply adds the bounce bio to current->bio_list without actually submitting it yet. That breaks the guarantee that forward progress is being made. To fix this, allocate the bio and bounce pages with GFP_NOWAIT if current->bio_list is set. If it fails, punt the encryption of the remaining part of the bio to a kworker. Fixes: 488f668 ("block: blk-crypto-fallback for Inline Encryption") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Author
|
Upstream branch: 8d3ae59 |
blktests-ci
Bot
force-pushed
the
series/1144347=>linus-master
branch
from
August 17, 2026 16:24
e216f17 to
be1c5e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: blk-crypto-fallback: Fix deadlock when encrypting large bio in dm layer
version: 2
url: https://patchwork.kernel.org/project/linux-block/list/?series=1144347