Re: [PATCH] RDMA/ucma: ucma_context reference leak in error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 10, 2018 at 10:26:23AM -0400, Shamir Rabinovitch wrote:
> Commit 6a21dfc ("RDMA/ucma: Limit possible option size") introduced
> a bug. running below command would cause tool hanged task warning:
> $ udaddy -c 1000 -C 1000 -S 1024 -t 3 -s <server-ip>
> 
> Below prints explain what happen:
> udaddy: set TOS option failed: Invalid argument
> 
> This issue is taken care by commit, 5f3e3b8 ("RDMA/ucma: Correct option
> size check using optlen") however this commit did not fix another
> issue introduced by commit 6a21dfc where ucma_context ref can leak in
> error path.
> 
> Fix it!
> 
> Fixes: 6a21dfc ("6a21dfc RDMA/ucma: Limit possible option size")
> Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@xxxxxxxxxx>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> ---
>  drivers/infiniband/core/ucma.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

Applied to for-next, but I changed the patch to just move the check
before the get and rewrote the commit message. Also please remember to
run checkpatch

Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux