diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2014-09-14 15:47:52 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-10-09 09:08:40 +0200 |
commit | 377b513485fd885dea1083a9a5430df65b35e048 (patch) | |
tree | 3947b460bda50002a70cbb9dad074d9cda8d3bad /drivers/infiniband | |
parent | IB/mlx5: Improve debug prints in mlx5_ib_reg_user_mr (diff) | |
download | linux-377b513485fd885dea1083a9a5430df65b35e048.tar.xz linux-377b513485fd885dea1083a9a5430df65b35e048.zip |
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')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 1 |
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); |