Skip to content
Commit 4eaf0932 authored by Milan Broz's avatar Milan Broz Committed by Jens Axboe
Browse files

block: Fix regression in sed-opal for a saved key.



The commit 3bfeb612
introduced the use of keyring for sed-opal.

Unfortunately, there is also a possibility to save
the Opal key used in opal_lock_unlock().

This patch switches the order of operation, so the cached
key is used instead of failure for opal_get_key.

The problem was found by the cryptsetup Opal test recently
added to the cryptsetup tree.

Fixes: 3bfeb612 ("block: sed-opal: keyring support for SED keys")
Tested-by: default avatarOndrej Kozina <okozina@redhat.com>
Signed-off-by: default avatarMilan Broz <gmazyland@gmail.com>
Link: https://lore.kernel.org/r/20231003100209.380037-1-gmazyland@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1364a3c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment