Browse Source

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>
Eli Cohen 11 years ago
parent
commit
377b513485
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/infiniband/core/uverbs_main.c

+ 1 - 0
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);