diff options
Diffstat (limited to 'security/keys/request_key.c')
-rw-r--r-- | security/keys/request_key.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index 63e63a42db3c..e8036cd0ad54 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c | |||
@@ -595,10 +595,9 @@ int wait_for_key_construction(struct key *key, bool intr) | |||
595 | intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); | 595 | intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); |
596 | if (ret) | 596 | if (ret) |
597 | return -ERESTARTSYS; | 597 | return -ERESTARTSYS; |
598 | if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) { | 598 | ret = key_read_state(key); |
599 | smp_rmb(); | 599 | if (ret < 0) |
600 | return key->reject_error; | 600 | return ret; |
601 | } | ||
602 | return key_validate(key); | 601 | return key_validate(key); |
603 | } | 602 | } |
604 | EXPORT_SYMBOL(wait_for_key_construction); | 603 | EXPORT_SYMBOL(wait_for_key_construction); |