diff options
author | Alex Estrin <[email protected]> | 2018-02-01 10:43:58 -0800 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2018-02-01 15:24:32 -0700 |
commit | 2b1e7fe16124e86ee9242aeeee859c79a843e3a2 (patch) | |
tree | 233de075dfe127bfcdc5faec36f5aa69d221381d /net/unix/sysctl_net_unix.c | |
parent | 473291b3ea0e1df81f7abf13b8ab4b98a346df5e (diff) |
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 <[email protected]>
Signed-off-by: Alex Estrin <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions