aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/genlock.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2013-10-14 18:23:08 (GMT)
committerGerrit - the friendly Code Review server <code-review@localhost>2013-10-25 18:25:40 (GMT)
commite3c43027bdb59f03eec7ead0a01c77e4bf801625 (patch)
tree68682605b956de3c310c3886cfa63f9f4dca3e7b /drivers/base/genlock.c
parent729c6bcf21ae9801f302b6c5d25127fd5bd6e3bd (diff)
base: genlock: Zero a structure before sending it to user space
In the handler for GENLOCK_IOC_EXPORT zero the entire genlock_lock structure before passing it to the user. CRs-fixed: 552303 Change-Id: Ic0dedbad257bf0a448d0bf67a14a3932b7925bfc Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/base/genlock.c')
-rw-r--r--drivers/base/genlock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/genlock.c b/drivers/base/genlock.c
index 58b0513..1149dec 100644
--- a/drivers/base/genlock.c
+++ b/drivers/base/genlock.c
@@ -788,6 +788,8 @@ static long genlock_dev_ioctl(struct file *filep, unsigned int cmd,
if (ret < 0)
return ret;
+ memset(&param, 0, sizeof(param));
+
param.fd = ret;
if (copy_to_user((void __user *) arg, &param,