diff options
Diffstat (limited to 'fs/crypto')
| -rw-r--r-- | fs/crypto/bio.c | 1 | ||||
| -rw-r--r-- | fs/crypto/fname.c | 1 | ||||
| -rw-r--r-- | fs/crypto/fscrypt_private.h | 1 | ||||
| -rw-r--r-- | fs/crypto/keyinfo.c | 6 | ||||
| -rw-r--r-- | fs/crypto/policy.c | 1 | 
5 files changed, 10 insertions, 0 deletions
| diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c index 483784d5eb73..0d5e6a569d58 100644 --- a/fs/crypto/bio.c +++ b/fs/crypto/bio.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0  /*   * This contains encryption functions for per-file encryption.   * diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index ad9f814fdead..8606da1df0aa 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0  /*   * This contains functions for filename crypto management   * diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index a1d5021c31ef..092e9dad1414 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */  /*   * fscrypt_private.h   * diff --git a/fs/crypto/keyinfo.c b/fs/crypto/keyinfo.c index 018c588c7ac3..a38630214058 100644 --- a/fs/crypto/keyinfo.c +++ b/fs/crypto/keyinfo.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0  /*   * key management facility for FS encryption support.   * @@ -109,6 +110,11 @@ static int validate_user_key(struct fscrypt_info *crypt_info,  		goto out;  	}  	ukp = user_key_payload_locked(keyring_key); +	if (!ukp) { +		/* key was revoked before we acquired its semaphore */ +		res = -EKEYREVOKED; +		goto out; +	}  	if (ukp->datalen != sizeof(struct fscrypt_key)) {  		res = -EINVAL;  		goto out; diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c index ce07a86200f3..a120649beeca 100644 --- a/fs/crypto/policy.c +++ b/fs/crypto/policy.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0  /*   * Encryption policy functions for per-file encryption support.   * |