mirror_ubuntu-kernels/drivers/infiniband/hw
Kaike Wan dfb5394f80 IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
When kobject_init_and_add() returns an error in the function
hfi1_create_port_files(), the function kobject_put() is not called for the
corresponding kobject, which potentially leads to memory leak.

This patch fixes the issue by calling kobject_put() even if
kobject_init_and_add() fails.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200326163813.21129.44280.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-03-27 13:13:36 -03:00
..
bnxt_re RDMA/bnxt_re: Wait for all the CQ events before freeing CQ data structures 2020-03-24 20:15:36 -03:00
cxgb4 Linux 5.6-rc4 2020-03-04 13:11:06 -04:00
efa RDMA/efa: Use in-kernel offsetofend() to check field availability 2020-03-18 21:06:37 -03:00
hfi1 IB/hfi1: Call kobject_put() when kobject_init_and_add() fails 2020-03-27 13:13:36 -03:00
hns RDMA/hns: Remove redundant judgment of qp_type 2020-03-26 16:52:29 -03:00
i40iw i40iw: Report correct firmware version 2020-03-18 13:53:44 -03:00
mlx4 RDMA/mlx4: Delete duplicated offsetofend implementation 2020-03-13 10:42:48 -03:00
mlx5 IB/mlx5: Move to fully dynamic UAR mode once user space supports it 2020-03-27 12:59:05 -03:00
mthca RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
ocrdma RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
qedr RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
qib IB/hfi1, qib: Ensure RCU is locked when accessing list 2020-03-02 11:10:21 -04:00
usnic RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
vmw_pvrdma RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00