summaryrefslogtreecommitdiffstats
path: root/drivers/misc/fastrpc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-15 08:36:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-15 08:36:41 +0100
commit83be46e944f630fde26ce03cb93f61a3066448e3 (patch)
treed94a48051f9311d99b615fa06adda2511f9cff2d /drivers/misc/fastrpc.c
parentf8096ff38d5f62d8a2c473e1bec0163a1b2b86d8 (diff)
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff)
downloadlinux-83be46e944f630fde26ce03cb93f61a3066448e3.tar.bz2
Merge v5.12-rc3 into char-misc-next
We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/fastrpc.c')
-rw-r--r--drivers/misc/fastrpc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index f12e909034ac..beda610e6b30 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -950,6 +950,11 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel,
if (!fl->cctx->rpdev)
return -EPIPE;
+ if (handle == FASTRPC_INIT_HANDLE && !kernel) {
+ dev_warn_ratelimited(fl->sctx->dev, "user app trying to send a kernel RPC message (%d)\n", handle);
+ return -EPERM;
+ }
+
ctx = fastrpc_context_alloc(fl, kernel, sc, args);
if (IS_ERR(ctx))
return PTR_ERR(ctx);