diff options
Diffstat (limited to 'security/keys/request_key.c')
-rw-r--r-- | security/keys/request_key.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index 381411941cc1..26a94f18af94 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c | |||
@@ -21,24 +21,6 @@ | |||
21 | 21 | ||
22 | #define key_negative_timeout 60 /* default timeout on a negative key's existence */ | 22 | #define key_negative_timeout 60 /* default timeout on a negative key's existence */ |
23 | 23 | ||
24 | /* | ||
25 | * wait_on_bit() sleep function for uninterruptible waiting | ||
26 | */ | ||
27 | static int key_wait_bit(void *flags) | ||
28 | { | ||
29 | schedule(); | ||
30 | return 0; | ||
31 | } | ||
32 | |||
33 | /* | ||
34 | * wait_on_bit() sleep function for interruptible waiting | ||
35 | */ | ||
36 | static int key_wait_bit_intr(void *flags) | ||
37 | { | ||
38 | schedule(); | ||
39 | return signal_pending(current) ? -ERESTARTSYS : 0; | ||
40 | } | ||
41 | |||
42 | /** | 24 | /** |
43 | * complete_request_key - Complete the construction of a key. | 25 | * complete_request_key - Complete the construction of a key. |
44 | * @cons: The key construction record. | 26 | * @cons: The key construction record. |
@@ -592,10 +574,9 @@ int wait_for_key_construction(struct key *key, bool intr) | |||
592 | int ret; | 574 | int ret; |
593 | 575 | ||
594 | ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, | 576 | ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, |
595 | intr ? key_wait_bit_intr : key_wait_bit, | ||
596 | intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); | 577 | intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); |
597 | if (ret < 0) | 578 | if (ret) |
598 | return ret; | 579 | return -ERESTARTSYS; |
599 | if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) { | 580 | if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) { |
600 | smp_rmb(); | 581 | smp_rmb(); |
601 | return key->type_data.reject_error; | 582 | return key->type_data.reject_error; |