]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Nullify ib_uobject during allocation
authorMatan Barak <matanb@mellanox.com>
Tue, 18 Apr 2017 09:03:39 +0000 (12:03 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Apr 2017 15:44:07 +0000 (11:44 -0400)
commit9f66b0a966c648bf124564a5bb408ee6334257c0
tree2c5ae8c0cdda14dda6c34ddc3f2a92e89040d359
parent101776eddaa018951098b68ebdd4c0abf9621be0
IB/core: Nullify ib_uobject during allocation

Currently, we initialize all fields of ib_uobject straight after
allocation. Therefore, a kmalloc was sufficient. Since ib_uobject
could be embedded in a type specific structure, we nullify it to
spare programmer errors.

Fixes: 64b9060fbcb0 ('IB/core: Add support for idr types')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/rdma_core.c