diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-05-30 11:20:24 +0300 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-05-30 15:45:58 -0300 |
| commit | cac2a301c02a9b178842e22df34217da7854e588 (patch) | |
| tree | dff8603baa23706a1f621e424e9a8c480f4a61ab /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | IB/hfi1: Use struct_size() helper (diff) | |
| download | linux-cac2a301c02a9b178842e22df34217da7854e588.tar.gz linux-cac2a301c02a9b178842e22df34217da7854e588.zip | |
RDMA/uverbs: check for allocation failure in uapi_add_elm()
If the kzalloc() fails then we should return ERR_PTR(-ENOMEM). In the
current code it's possible that the kzalloc() fails and the
radix_tree_insert() inserts the NULL pointer successfully and we return
the NULL "elm" pointer to the caller. That results in a NULL pointer
dereference.
Fixes: 9ed3e5f44772 ("IB/uverbs: Build the specs into a radix tree at runtime")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
