Commit 4eaf093
block: Fix regression in sed-opal for a saved key.
The commit 3bfeb61
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: 3bfeb61 ("block: sed-opal: keyring support for SED keys")
Tested-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Link: https://lore.kernel.org/r/20231003100209.380037-1-gmazyland@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 1364a3c commit 4eaf093
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2888 | 2888 | | |
2889 | 2889 | | |
2890 | 2890 | | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
2894 | 2891 | | |
2895 | 2892 | | |
2896 | | - | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
2897 | 2896 | | |
2898 | 2897 | | |
2899 | 2898 | | |
| |||
0 commit comments