Re: [PATCH] of: overlay: Stop leaking resources on overlay removal

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

 



On 04/24/18 10:50, Jan Kiszka wrote:
> On 2018-04-24 19:44, Frank Rowand wrote:
>> On 04/24/18 09:19, Jan Kiszka wrote:
>>> Only the overlay notifier callbacks have a chance to potentially get
>>> hold of references to those two resources, but they do not store them.
>>> So it is safe to stop the intentional leaking.
>>>
>>> See also https://lkml.org/lkml/2018/4/23/1063 and following.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>>> ---
>>>
>>> Ideally, we sort out any remaining worries during the 4.17-rc cycle.
>>>
>>>  drivers/of/overlay.c | 13 ++-----------
>>>  1 file changed, 2 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
>>> index b35fe88f1851..3553f1f57a62 100644
>>> --- a/drivers/of/overlay.c
>>> +++ b/drivers/of/overlay.c
>>> @@ -671,17 +671,8 @@ static void free_overlay_changeset(struct overlay_changeset *ovcs)
>>>  		of_node_put(ovcs->fragments[i].overlay);
>>>  	}
>>>  	kfree(ovcs->fragments);
>>> -
>>> -	/*
>>> -	 * TODO
>>> -	 *
>>> -	 * would like to: kfree(ovcs->overlay_tree);
>>> -	 * but can not since drivers may have pointers into this data
>>> -	 *
>>> -	 * would like to: kfree(ovcs->fdt);
>>> -	 * but can not since drivers may have pointers into this data
>>> -	 */
>>> -
>>> +	kfree(ovcs->overlay_tree);
>>> +	kfree(ovcs->fdt);
>>>  	kfree(ovcs);
>>>  }
>>>  
>>>
>>
>> Nack.  It is premature to submit this while the conversation is
>> continuing in the other thread.
>>
>> I'll continue the conversation in the other thread.
>>
> 
> Well, at least the strongest argument has been resolved now, the
> notifier topic. Curious to learn what remains. As I noted, we should
> work hard to sort out the API regression prior to the release.

Nope, the notifier discussion continues in the other thread.

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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux