aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/rtas.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-01-14 22:26:03 +0800
committerAlex Shi <alex.shi@linaro.org>2016-01-14 22:26:03 +0800
commit8fa6d2e1fe937af9dbacb5aad8c43dbb67466fa0 (patch)
tree53b1cbcaec14e50f491e1cb1f20106c7a15c70e8 /arch/powerpc/kernel/rtas.c
parent74bc3fe5f5fbb50d63fd002ce240cc7bca236db1 (diff)
parentf90ae1b62bedd8b57966a7be68855f2d43170db6 (diff)
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-androidlsk-v3.18-16.01-android
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r--arch/powerpc/kernel/rtas.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index af0dafab5807..79c459a2b684 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -1045,6 +1045,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
+ if (!rtas.entry)
+ return -EINVAL;
+
if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
return -EFAULT;