aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 394169a8577d..f55856b21992 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -168,6 +168,12 @@ int crypto_register_alg(struct crypto_alg *alg)
168{ 168{
169 int ret = 0; 169 int ret = 0;
170 struct crypto_alg *q; 170 struct crypto_alg *q;
171
172 if (alg->cra_alignmask & (alg->cra_alignmask + 1))
173 return -EINVAL;
174
175 if (alg->cra_alignmask > PAGE_SIZE)
176 return -EINVAL;
171 177
172 down_write(&crypto_alg_sem); 178 down_write(&crypto_alg_sem);
173 179