diff options
author | Dave Airlie <airlied@redhat.com> | 2020-09-08 07:41:40 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-09-08 07:41:40 +0300 |
commit | ce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf (patch) | |
tree | 3a54614d597b7b92ada36c5ea26dc994216b628b /crypto/af_alg.c | |
parent | 3393649977f9a8847c659e282ea290d4b703295c (diff) | |
parent | f4d51dffc6c01a9e94650d95ce0104964f8ae822 (diff) | |
download | linux-ce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf.tar.xz |
Merge tag 'v5.9-rc4' into drm-next
Backmerge 5.9-rc4 as there is a nasty qxl conflict
that needs to be resolved.
Signed-off-by: Dave Airlie <airlied@redhat.com>
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; |