summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/uverbs_main.c
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2014-09-14 17:47:52 +0400
committerRoland Dreier <roland@purestorage.com>2014-10-09 11:08:40 +0400
commit377b513485fd885dea1083a9a5430df65b35e048 (patch)
tree3947b460bda50002a70cbb9dad074d9cda8d3bad /drivers/infiniband/core/uverbs_main.c
parent900a6d79176ea9172e19f86aa324e9198b40339c (diff)
downloadlinux-377b513485fd885dea1083a9a5430df65b35e048.tar.xz
IB/core: Avoid leakage from kernel to user space
Clear the reserved field of struct ib_uverbs_async_event_desc which is copied to user space. Signed-off-by: Eli Cohen <eli@mellanox.com> Reviewed-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r--drivers/infiniband/core/uverbs_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index c73b22a257fe..b21af1eaf503 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -477,6 +477,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
entry->desc.async.element = element;
entry->desc.async.event_type = event;
+ entry->desc.async.reserved = 0;
entry->counter = counter;
list_add_tail(&entry->list, &file->async_file->event_list);