[PATCH 0/3] delay timer_new to avoid memleaks

pannengyuan@huawei.com posted 3 patches 4 years, 3 months ago
Test docker-quick@centos7 passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200205070659.22488-1-pannengyuan@huawei.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Alistair Francis <alistair@alistair23.me>
hw/arm/stellaris.c         | 7 ++++++-
hw/timer/armv7m_systick.c  | 6 ++++++
hw/timer/stm32f2xx_timer.c | 5 +++++
3 files changed, 17 insertions(+), 1 deletion(-)
[PATCH 0/3] delay timer_new to avoid memleaks
Posted by pannengyuan@huawei.com 4 years, 3 months ago
From: Pan Nengyuan <pannengyuan@huawei.com>

This series delay timer_new into realize() to fix some memleaks when we call 'device-list-properties'.

Pan Nengyuan (3):
  armv7m_systick: delay timer_new to avoid memleaks
  stm32f2xx_timer: delay timer_new to avoid memleaks
  stellaris: delay timer_new to avoid memleaks

 hw/arm/stellaris.c         | 7 ++++++-
 hw/timer/armv7m_systick.c  | 6 ++++++
 hw/timer/stm32f2xx_timer.c | 5 +++++
 3 files changed, 17 insertions(+), 1 deletion(-)

-- 
2.21.0.windows.1



Re: [PATCH 0/3] delay timer_new to avoid memleaks
Posted by Peter Maydell 4 years, 3 months ago
On Wed, 5 Feb 2020 at 07:07, <pannengyuan@huawei.com> wrote:
>
> From: Pan Nengyuan <pannengyuan@huawei.com>
>
> This series delay timer_new into realize() to fix some memleaks when we call 'device-list-properties'.
>
> Pan Nengyuan (3):
>   armv7m_systick: delay timer_new to avoid memleaks
>   stm32f2xx_timer: delay timer_new to avoid memleaks
>   stellaris: delay timer_new to avoid memleaks
>
>  hw/arm/stellaris.c         | 7 ++++++-
>  hw/timer/armv7m_systick.c  | 6 ++++++
>  hw/timer/stm32f2xx_timer.c | 5 +++++
>  3 files changed, 17 insertions(+), 1 deletion(-)



Applied to target-arm.next, thanks.

-- PMM

Re: [PATCH 0/3] delay timer_new to avoid memleaks
Posted by Philippe Mathieu-Daudé 4 years, 3 months ago
On 2/5/20 8:06 AM, pannengyuan@huawei.com wrote:
> From: Pan Nengyuan <pannengyuan@huawei.com>
> 
> This series delay timer_new into realize() to fix some memleaks when we call 'device-list-properties'.
> 
> Pan Nengyuan (3):
>    armv7m_systick: delay timer_new to avoid memleaks
>    stm32f2xx_timer: delay timer_new to avoid memleaks
>    stellaris: delay timer_new to avoid memleaks
> 
>   hw/arm/stellaris.c         | 7 ++++++-
>   hw/timer/armv7m_systick.c  | 6 ++++++
>   hw/timer/stm32f2xx_timer.c | 5 +++++
>   3 files changed, 17 insertions(+), 1 deletion(-)

You might want to look at Coccinelle [*] and write a spatch script to 
check/fix all the codebase at once. You can find some examples in 
scripts/coccinelle/.

[*] http://coccinelle.lip6.fr/


Re: [PATCH 0/3] delay timer_new to avoid memleaks
Posted by Pan Nengyuan 4 years, 3 months ago

On 2/5/2020 9:16 PM, Philippe Mathieu-Daudé wrote:
> On 2/5/20 8:06 AM, pannengyuan@huawei.com wrote:
>> From: Pan Nengyuan <pannengyuan@huawei.com>
>>
>> This series delay timer_new into realize() to fix some memleaks when we call 'device-list-properties'.
>>
>> Pan Nengyuan (3):
>>    armv7m_systick: delay timer_new to avoid memleaks
>>    stm32f2xx_timer: delay timer_new to avoid memleaks
>>    stellaris: delay timer_new to avoid memleaks
>>
>>   hw/arm/stellaris.c         | 7 ++++++-
>>   hw/timer/armv7m_systick.c  | 6 ++++++
>>   hw/timer/stm32f2xx_timer.c | 5 +++++
>>   3 files changed, 17 insertions(+), 1 deletion(-)
> 
> You might want to look at Coccinelle [*] and write a spatch script to check/fix all the codebase at once. You can find some examples in scripts/coccinelle/.

Thanks for these tips. I will pay attention.

> 
> [*] http://coccinelle.lip6.fr/
>