lkml.org 
[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] drm/amdgpu: fix memory leak
    Date

    On 10/4/19 1:30 PM, Koenig, Christian wrote:
    > Am 04.10.19 um 13:26 schrieb Das, Nirmoy:
    >> On 10/4/19 1:13 PM, Koenig, Christian wrote:
    >>>>> NAK, that is a double free. The bo list entries are freed by
    >>>>> amdgpu_bo_list_put().
    >>>> Thanks, didn't realize that.
    >>> Wait a second, what entries are you talking about?
    >>>
    >>> The entries in the list object are freed when amdgpu_bo_list_put() is
    >>> called, but the temporary info array with the handles needs to be freed
    >>> as well.
    >>>
    >>> And it looks like that is indeed leaked here.
    >> I am talking about the `info` array created by
    >> amdgpu_bo_create_list_entry_array().
    > Yeah, that are the handles and not the entries. Sorry that I was
    > confused about that.
    >
    > Your patch is correct, you should just update the commit message a bit.
    >
    > BTW: Could you cleanup error handling here a bit more?
    >
    > E.g. add an error_put_list handle and drop the "if (info)" and instead
    > return directly if we fail to allocate info.
    Okay I will do that in v2 of this patch.
    > Thanks,
    > Christian.


    Regards,

    Nirmoy

    \
     
     \ /
      Last update: 2019-10-04 13:36    [W:3.147 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site