* [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
@ 2019-07-26 1:51 Shaokun Zhang
2019-07-26 9:18 ` Marc Zyngier
2019-07-26 9:32 ` [PATCH v2] " Shaokun Zhang
0 siblings, 2 replies; 5+ messages in thread
From: Shaokun Zhang @ 2019-07-26 1:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Nianyao Tang, Thomas Gleixner, Jason Cooper, Marc Zyngier
From: Nianyao Tang <tangnianyao@huawei.com>
In its_vpe_init, when its_alloc_vpe_table fails, we should free
vpt_page allocated just before, instead of vpe->vpt_page.
Let's fix it.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Nianyao Tang <tangnianyao@huawei.com>
---
drivers/irqchip/irq-gic-v3-its.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 730fbe0..1b5c367 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe)
if (!its_alloc_vpe_table(vpe_id)) {
its_vpe_id_free(vpe_id);
- its_free_pending_table(vpe->vpt_page);
+ its_free_pending_table(vpt_page);
return -ENOMEM;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
2019-07-26 1:51 [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail Shaokun Zhang
@ 2019-07-26 9:18 ` Marc Zyngier
2019-07-26 9:24 ` Zhangshaokun
2019-07-26 9:32 ` [PATCH v2] " Shaokun Zhang
1 sibling, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2019-07-26 9:18 UTC (permalink / raw)
To: Shaokun Zhang; +Cc: linux-kernel, Nianyao Tang, Thomas Gleixner, Jason Cooper
On Fri, 26 Jul 2019 09:51:45 +0800
Shaokun Zhang <zhangshaokun@hisilicon.com> wrote:
> From: Nianyao Tang <tangnianyao@huawei.com>
>
> In its_vpe_init, when its_alloc_vpe_table fails, we should free
> vpt_page allocated just before, instead of vpe->vpt_page.
> Let's fix it.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Nianyao Tang <tangnianyao@huawei.com>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 730fbe0..1b5c367 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe)
>
> if (!its_alloc_vpe_table(vpe_id)) {
> its_vpe_id_free(vpe_id);
> - its_free_pending_table(vpe->vpt_page);
> + its_free_pending_table(vpt_page);
> return -ENOMEM;
> }
>
Oops, well caught. Please repost this patch with your own SoB added
though, as you're posting the patch on behalf of someone else.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
2019-07-26 9:18 ` Marc Zyngier
@ 2019-07-26 9:24 ` Zhangshaokun
0 siblings, 0 replies; 5+ messages in thread
From: Zhangshaokun @ 2019-07-26 9:24 UTC (permalink / raw)
To: Marc Zyngier; +Cc: linux-kernel, Nianyao Tang, Thomas Gleixner, Jason Cooper
Hi Marc,
On 2019/7/26 17:18, Marc Zyngier wrote:
> On Fri, 26 Jul 2019 09:51:45 +0800
> Shaokun Zhang <zhangshaokun@hisilicon.com> wrote:
>
>> From: Nianyao Tang <tangnianyao@huawei.com>
>>
>> In its_vpe_init, when its_alloc_vpe_table fails, we should free
>> vpt_page allocated just before, instead of vpe->vpt_page.
>> Let's fix it.
>>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Jason Cooper <jason@lakedaemon.net>
>> Cc: Marc Zyngier <marc.zyngier@arm.com>
>> Signed-off-by: Nianyao Tang <tangnianyao@huawei.com>
>> ---
>> drivers/irqchip/irq-gic-v3-its.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
>> index 730fbe0..1b5c367 100644
>> --- a/drivers/irqchip/irq-gic-v3-its.c
>> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> @@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe)
>>
>> if (!its_alloc_vpe_table(vpe_id)) {
>> its_vpe_id_free(vpe_id);
>> - its_free_pending_table(vpe->vpt_page);
>> + its_free_pending_table(vpt_page);
>> return -ENOMEM;
>> }
>>
>
> Oops, well caught. Please repost this patch with your own SoB added
> though, as you're posting the patch on behalf of someone else.
>
Thanks your reminder and I will do it in v2 version.
Shaokun
> Thanks,
>
> M.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
2019-07-26 1:51 [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail Shaokun Zhang
2019-07-26 9:18 ` Marc Zyngier
@ 2019-07-26 9:32 ` Shaokun Zhang
2019-07-26 13:17 ` Marc Zyngier
1 sibling, 1 reply; 5+ messages in thread
From: Shaokun Zhang @ 2019-07-26 9:32 UTC (permalink / raw)
To: linux-kernel
Cc: Nianyao Tang, Thomas Gleixner, Jason Cooper, Marc Zyngier, Shaokun Zhang
From: Nianyao Tang <tangnianyao@huawei.com>
In its_vpe_init, when its_alloc_vpe_table fails, we should free
vpt_page allocated just before, instead of vpe->vpt_page.
Let's fix it.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Nianyao Tang <tangnianyao@huawei.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
drivers/irqchip/irq-gic-v3-its.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 730fbe0e2a9d..1b5c3672aea2 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe)
if (!its_alloc_vpe_table(vpe_id)) {
its_vpe_id_free(vpe_id);
- its_free_pending_table(vpe->vpt_page);
+ its_free_pending_table(vpt_page);
return -ENOMEM;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
2019-07-26 9:32 ` [PATCH v2] " Shaokun Zhang
@ 2019-07-26 13:17 ` Marc Zyngier
0 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2019-07-26 13:17 UTC (permalink / raw)
To: Shaokun Zhang; +Cc: linux-kernel, Nianyao Tang, Thomas Gleixner, Jason Cooper
On Fri, 26 Jul 2019 10:32:57 +0100,
Shaokun Zhang <zhangshaokun@hisilicon.com> wrote:
>
> From: Nianyao Tang <tangnianyao@huawei.com>
>
> In its_vpe_init, when its_alloc_vpe_table fails, we should free
> vpt_page allocated just before, instead of vpe->vpt_page.
> Let's fix it.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Nianyao Tang <tangnianyao@huawei.com>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 730fbe0e2a9d..1b5c3672aea2 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe)
>
> if (!its_alloc_vpe_table(vpe_id)) {
> its_vpe_id_free(vpe_id);
> - its_free_pending_table(vpe->vpt_page);
> + its_free_pending_table(vpt_page);
> return -ENOMEM;
> }
>
> --
> 2.7.4
>
Applied, thanks.
M.
--
Jazz is not dead, it just smells funny.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-26 13:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 1:51 [PATCH] irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail Shaokun Zhang
2019-07-26 9:18 ` Marc Zyngier
2019-07-26 9:24 ` Zhangshaokun
2019-07-26 9:32 ` [PATCH v2] " Shaokun Zhang
2019-07-26 13:17 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).