mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
923b49ff69
commit
29707b206c
7 changed files with 12 additions and 12 deletions
|
|
@ -609,7 +609,7 @@ static struct encrypted_key_payload *encrypted_key_alloc(struct key *key,
|
|||
long dlen;
|
||||
int ret;
|
||||
|
||||
ret = strict_strtol(datalen, 10, &dlen);
|
||||
ret = kstrtol(datalen, 10, &dlen);
|
||||
if (ret < 0 || dlen < MIN_DATA_SIZE || dlen > MAX_DATA_SIZE)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
|
|||
return -EINVAL;
|
||||
break;
|
||||
case Opt_keyhandle:
|
||||
res = strict_strtoul(args[0].from, 16, &handle);
|
||||
res = kstrtoul(args[0].from, 16, &handle);
|
||||
if (res < 0)
|
||||
return -EINVAL;
|
||||
opt->keytype = SEAL_keytype;
|
||||
|
|
@ -782,7 +782,7 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
|
|||
return -EINVAL;
|
||||
break;
|
||||
case Opt_pcrlock:
|
||||
res = strict_strtoul(args[0].from, 10, &lock);
|
||||
res = kstrtoul(args[0].from, 10, &lock);
|
||||
if (res < 0)
|
||||
return -EINVAL;
|
||||
opt->pcrlock = lock;
|
||||
|
|
@ -820,7 +820,7 @@ static int datablob_parse(char *datablob, struct trusted_key_payload *p,
|
|||
c = strsep(&datablob, " \t");
|
||||
if (!c)
|
||||
return -EINVAL;
|
||||
ret = strict_strtol(c, 10, &keylen);
|
||||
ret = kstrtol(c, 10, &keylen);
|
||||
if (ret < 0 || keylen < MIN_KEY_SIZE || keylen > MAX_KEY_SIZE)
|
||||
return -EINVAL;
|
||||
p->key_len = keylen;
|
||||
|
|
|
|||
Loading…
Reference in a new issue