Re: [PATCH 1/3] IB/rdmavt,hfi1,qib: Fix memory leak

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

 



On Thu, Apr 21, 2016 at 03:50:42PM +0300, Leon Romanovsky wrote:
On Thu, Apr 21, 2016 at 08:22:17AM -0400, Dennis Dalessandro wrote:
On Thu, Apr 21, 2016 at 12:38:27PM +0300, Leon Romanovsky wrote:
>On Wed, Apr 20, 2016 at 06:05:24AM -0700, Dennis Dalessandro wrote:
>>From: Jubin John <jubin.john@xxxxxxxxx>
>>
>>rdi->ports has memory allocated in rvt_alloc_device(), but does not get
>>freed because the hfi1 and qib drivers drivers call ib_dealloc_device()
>>directly instead of going through rdmavt. Add a rvt_dealloc_device()
>>that frees rdi->ports and then calls ib_dealloc_device(). Switch hfi1
>>and qib drivers to calling rvt_dealloc_device() instead of
>>ib_dealloc_device() directly.
>>
>>Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
>
>Dennis,
>You posted Fixes line in two other patches, please do in this one two.
>It is needed for proper tracking.
>
>Except this,
>Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Hi Leon, I don't think that a fixes line is warranted in this case. There
isn't a single commit that causes this issue. It is a missed code path being
moved to rdmavt.

So, it fixed the initial commit.
You can easily send an appropriate Fixes line as a response to this
email without need to resubmit the patches.


We have the commit which added the alloc_device() to rdmavt.

Fixes: ff6acd69518e ("IB/rdmavt: Add device structure allocation")

However the dealloc_device would probably have been a follow on patch. So that fixes line is probably not really appropriate. Then we have the patches which used the alloc_device in qib and hfi1 and you could make the case the dealloc_device should have went in those commits.

So we have these two:
Fixes: 5df1673f1de2 ("IB/qib: Use rdmavt device allocation function")
Fixes: 7af6d00654a1 ("staging/rdma/hfi1: Use rdmavt device allocation function")

-Denny
--
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