diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-31 07:11:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-31 07:11:45 +0200 |
commit | 5fedf0d295d3ef69fd85fdee4cb68fd3756b54c2 (patch) | |
tree | 777c39ad4586149de154be3c4c102f751336a37b /crypto/af_alg.c | |
parent | 3ed8e1c2ac9914a2fcb08ec13476b85319536cea (diff) | |
parent | f75aef392f869018f78cfedf3c320a6b3fcfda6b (diff) |
Merge 5.9-rc3 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/af_alg.c')
-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; |