diff options
author | Jingoo Han <jg1.han@samsung.com> | 2014-02-05 01:13:14 -0500 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-02-06 03:11:04 -0500 |
commit | 29707b206c5171ac6583a4d1e9ec3af937e8c2e4 (patch) | |
tree | 89eaafa4bfc49b2418db3bdfb367e65f643d2e79 /security/keys | |
parent | 923b49ff69fcbffe6f8b2739de218c45544392a7 (diff) |
security: replace strict_strto*() with kstrto*()
The usage of strict_strto*() is not preferred, because
strict_strto*() is obsolete. Thus, kstrto*() should be
used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/encrypted-keys/encrypted.c | 2 | ||||
-rw-r--r-- | security/keys/trusted.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c index 9e1e005c7596..5fe443d120af 100644 --- a/security/keys/encrypted-keys/encrypted.c +++ b/security/keys/encrypted-keys/encrypted.c | |||
@@ -609,7 +609,7 @@ static struct encrypted_key_payload *encrypted_key_alloc(struct key *key, | |||
609 | long dlen; | 609 | long dlen; |
610 | int ret; | 610 | int ret; |
611 | 611 | ||
612 | ret = strict_strtol(datalen, 10, &dlen); | 612 | ret = kstrtol(datalen, 10, &dlen); |
613 | if (ret < 0 || dlen < MIN_DATA_SIZE || dlen > MAX_DATA_SIZE) | 613 | if (ret < 0 || dlen < MIN_DATA_SIZE || dlen > MAX_DATA_SIZE) |
614 | return ERR_PTR(-EINVAL); | 614 | return ERR_PTR(-EINVAL); |
615 | 615 | ||
diff --git a/security/keys/trusted.c b/security/keys/trusted.c index e13fcf7636f7..6b804aa4529a 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c | |||
@@ -753,7 +753,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay, | |||
753 | return -EINVAL; | 753 | return -EINVAL; |
754 | break; | 754 | break; |
755 | case Opt_keyhandle: | 755 | case Opt_keyhandle: |
756 | res = strict_strtoul(args[0].from, 16, &handle); | 756 | res = kstrtoul(args[0].from, 16, &handle); |
757 | if (res < 0) | 757 | if (res < 0) |
758 | return -EINVAL; | 758 | return -EINVAL; |
759 | opt->keytype = SEAL_keytype; | 759 | opt->keytype = SEAL_keytype; |
@@ -782,7 +782,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay, | |||
782 | return -EINVAL; | 782 | return -EINVAL; |
783 | break; | 783 | break; |
784 | case Opt_pcrlock: | 784 | case Opt_pcrlock: |
785 | res = strict_strtoul(args[0].from, 10, &lock); | 785 | res = kstrtoul(args[0].from, 10, &lock); |
786 | if (res < 0) | 786 | if (res < 0) |
787 | return -EINVAL; | 787 | return -EINVAL; |
788 | opt->pcrlock = lock; | 788 | opt->pcrlock = lock; |
@@ -820,7 +820,7 @@ static int datablob_parse(char *datablob, struct trusted_key_payload *p, | |||
820 | c = strsep(&datablob, " \t"); | 820 | c = strsep(&datablob, " \t"); |
821 | if (!c) | 821 | if (!c) |
822 | return -EINVAL; | 822 | return -EINVAL; |
823 | ret = strict_strtol(c, 10, &keylen); | 823 | ret = kstrtol(c, 10, &keylen); |
824 | if (ret < 0 || keylen < MIN_KEY_SIZE || keylen > MAX_KEY_SIZE) | 824 | if (ret < 0 || keylen < MIN_KEY_SIZE || keylen > MAX_KEY_SIZE) |
825 | return -EINVAL; | 825 | return -EINVAL; |
826 | p->key_len = keylen; | 826 | p->key_len = keylen; |