Skip to content
Commit 2b1e7fe1 authored by Alex Estrin's avatar Alex Estrin Committed by Jason Gunthorpe
Browse files

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: e11ffbd5 ("IB/hfi1: Do not free hfi1 cdev parent structure early")
Reviewed-by: default avatarMichael J Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: default avatarAlex Estrin <alex.estrin@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 473291b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment