diff options
author | Alex Estrin <alex.estrin@intel.com> | 2018-02-01 21:43:58 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-02-02 01:24:32 +0300 |
commit | 2b1e7fe16124e86ee9242aeeee859c79a843e3a2 (patch) | |
tree | 233de075dfe127bfcdc5faec36f5aa69d221381d /drivers/infiniband/hw/hfi1/rc.c | |
parent | 473291b3ea0e1df81f7abf13b8ab4b98a346df5e (diff) | |
download | linux-2b1e7fe16124e86ee9242aeeee859c79a843e3a2.tar.xz |
IB/hfi1: Fix for potential refcount leak in hfi1_open_file()
The dd refcount is speculatively incremented prior to allocating
the fd memory with kzalloc(). If that kzalloc() failed the dd
refcount leaks.
Increment refcount on kzalloc success.
Fixes: e11ffbd57520 ("IB/hfi1: Do not free hfi1 cdev parent structure early")
Reviewed-by: Michael J Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/rc.c')
0 files changed, 0 insertions, 0 deletions