diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-31 00:53:44 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-31 00:53:44 +0200 |
commit | e43327c706f28d9e66fc4242af4aefdd69e8ff24 (patch) | |
tree | 797a6bafd7df88c351f1ffcee0bfa83ada95f7a2 /crypto | |
parent | Merge tag 'x86-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
parent | crypto: af_alg - Work around empty control messages without MSG_MORE (diff) | |
download | linux-e43327c706f28d9e66fc4242af4aefdd69e8ff24.tar.xz linux-e43327c706f28d9e66fc4242af4aefdd69e8ff24.zip |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- fix regression in af_alg that affects iwd
- restore polling delay in qat
- fix double free in ingenic on error path
- fix potential build failure in sa2ul due to missing Kconfig dependency
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: af_alg - Work around empty control messages without MSG_MORE
crypto: sa2ul - add Kconfig selects to fix build error
crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc
crypto: qat - add delay before polling mailbox
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/af_alg.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index a6f581ab200c..8be8bec07cdd 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -16,6 +16,7 @@ #include <linux/module.h> #include <linux/net.h> #include <linux/rwsem.h> +#include <linux/sched.h> #include <linux/sched/signal.h> #include <linux/security.h> @@ -845,9 +846,15 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, } lock_sock(sk); - if (ctx->init && (init || !ctx->more)) { - err = -EINVAL; - goto unlock; + if (ctx->init && !ctx->more) { + if (ctx->used) { + err = -EINVAL; + goto unlock; + } + + pr_info_once( + "%s sent an empty control message without MSG_MORE.\n", + current->comm); } ctx->init = true; |