Skip to content
Commit 6220ec40 authored by Eric Biggers's avatar Eric Biggers Committed by Greg Kroah-Hartman
Browse files

ext4: don't set up encryption key during jbd2 transaction



From: Eric Biggers <ebiggers@google.com>

commit 4c0d5778 upstream.

Commit a80f7fcf ("ext4: fixup ext4_fc_track_* functions' signature")
extended the scope of the transaction in ext4_unlink() too far, making
it include the call to ext4_find_entry().  However, ext4_find_entry()
can deadlock when called from within a transaction because it may need
to set up the directory's encryption key.

Fix this by restoring the transaction to its original scope.

Reported-by: default avatar <syzbot+1a748d0007eeac3ab079@syzkaller.appspotmail.com>
Fixes: a80f7fcf ("ext4: fixup ext4_fc_track_* functions' signature")
Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221106224841.279231-3-ebiggers@kernel.org


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6482d42b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment