2022-06-22 06:30:49

by Liang He

[permalink] [raw]
Subject: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()

We need to add missing of_node_get() for of_find_matching_node() to
keep refcount balance.

Note: of_find_matching_node() will decrease the refcount of its first
arg.

Signed-off-by: Liang He <[email protected]>
---
drivers/irqchip/irq-gic-v3-its.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 5ff09de6c48f..829893cc5e10 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5309,6 +5309,7 @@ static int __init its_of_probe(struct device_node *node)
* reset, don't even try to go any further, as this could
* result in something even worse.
*/
+ of_node_get(node);
for (np = of_find_matching_node(node, its_device_id); np;
np = of_find_matching_node(np, its_device_id)) {
int err;
@@ -5323,6 +5324,7 @@ static int __init its_of_probe(struct device_node *node)
return err;
}

+ of_node_get(node);
for (np = of_find_matching_node(node, its_device_id); np;
np = of_find_matching_node(np, its_device_id)) {
if (!of_device_is_available(np))
--
2.25.1


2022-06-22 08:16:53

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()

+ Miaoqian Lin

On Wed, 22 Jun 2022 07:21:38 +0100,
Liang He <[email protected]> wrote:
>
> We need to add missing of_node_get() for of_find_matching_node() to
> keep refcount balance.
>
> Note: of_find_matching_node() will decrease the refcount of its first
> arg.
>
> Signed-off-by: Liang He <[email protected]>

[...]

Please send these refcount fixes as a series for all the irqchip
drivers, not one every other day.

And please synchronise with Miaoqian Lin, as you are obviously both
chasing the same bugs.

Thanks,

M.

--
Without deviation from the norm, progress is not possible.

2022-06-22 08:55:13

by Liang He

[permalink] [raw]
Subject: Re:Re: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()



At 2022-06-22 16:03:26, "Marc Zyngier" <[email protected]> wrote:
>+ Miaoqian Lin
>
>On Wed, 22 Jun 2022 07:21:38 +0100,
>Liang He <[email protected]> wrote:
>>
>> We need to add missing of_node_get() for of_find_matching_node() to
>> keep refcount balance.
>>
>> Note: of_find_matching_node() will decrease the refcount of its first
>> arg.
>>
>> Signed-off-by: Liang He <[email protected]>
>
>[...]
>
>Please send these refcount fixes as a series for all the irqchip
>drivers, not one every other day.
>

Sorry, I will group similar bugs in future.


>And please synchronise with Miaoqian Lin, as you are obviously both
>chasing the same bugs.
>
>Thanks,
>
> M.

Yes, before I send any new bug, I will confirm that this bug has not been reported in lore.kernel.org.

By the way, this is a bug missing |GET|, not |PUT|, which is different with Miaoqian's and my patches before.

>
>--
>Without deviation from the norm, progress is not possible.

2022-06-22 08:57:56

by Liang He

[permalink] [raw]
Subject: Re:Re: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()




At 2022-06-22 16:29:49, "Marc Zyngier" <[email protected]> wrote:
>On Wed, 22 Jun 2022 09:15:56 +0100,
>"Liang He" <[email protected]> wrote:
>>
>>
>>
>> At 2022-06-22 16:03:26, "Marc Zyngier" <[email protected]> wrote:
>> >+ Miaoqian Lin
>> >
>> >On Wed, 22 Jun 2022 07:21:38 +0100,
>> >Liang He <[email protected]> wrote:
>> >>
>> >> We need to add missing of_node_get() for of_find_matching_node() to
>> >> keep refcount balance.
>> >>
>> >> Note: of_find_matching_node() will decrease the refcount of its first
>> >> arg.
>> >>
>> >> Signed-off-by: Liang He <[email protected]>
>> >
>> >[...]
>> >
>> >Please send these refcount fixes as a series for all the irqchip
>> >drivers, not one every other day.
>> >
>>
>> Sorry, I will group similar bugs in future.
>>
>>
>> >And please synchronise with Miaoqian Lin, as you are obviously both
>> >chasing the same bugs.
>> >
>> >Thanks,
>> >
>> > M.
>>
>> Yes, before I send any new bug, I will confirm that this bug has not
>> been reported in lore.kernel.org.
>
>This is not what I meant. I am asking you to actively coordinate with
>Miaoqian, working with them as a team instead of you both sending
>competing series. I would like to see one series with patches from you
>both.

OK, I get it. This depends on Miaoqian.

@[email protected]

>
>> By the way, this is a bug missing |GET|, not |PUT|, which is
>> different with Miaoqian's and my patches before.
>
>Well, yet another reason for you both to work together, as you are
>complementing each other.
>
>Thanks,
>
> M.
>
>--
>Without deviation from the norm, progress is not possible.

2022-06-22 09:30:04

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()

On Wed, 22 Jun 2022 09:15:56 +0100,
"Liang He" <[email protected]> wrote:
>
>
>
> At 2022-06-22 16:03:26, "Marc Zyngier" <[email protected]> wrote:
> >+ Miaoqian Lin
> >
> >On Wed, 22 Jun 2022 07:21:38 +0100,
> >Liang He <[email protected]> wrote:
> >>
> >> We need to add missing of_node_get() for of_find_matching_node() to
> >> keep refcount balance.
> >>
> >> Note: of_find_matching_node() will decrease the refcount of its first
> >> arg.
> >>
> >> Signed-off-by: Liang He <[email protected]>
> >
> >[...]
> >
> >Please send these refcount fixes as a series for all the irqchip
> >drivers, not one every other day.
> >
>
> Sorry, I will group similar bugs in future.
>
>
> >And please synchronise with Miaoqian Lin, as you are obviously both
> >chasing the same bugs.
> >
> >Thanks,
> >
> > M.
>
> Yes, before I send any new bug, I will confirm that this bug has not
> been reported in lore.kernel.org.

This is not what I meant. I am asking you to actively coordinate with
Miaoqian, working with them as a team instead of you both sending
competing series. I would like to see one series with patches from you
both.

> By the way, this is a bug missing |GET|, not |PUT|, which is
> different with Miaoqian's and my patches before.

Well, yet another reason for you both to work together, as you are
complementing each other.

Thanks,

M.

--
Without deviation from the norm, progress is not possible.

2022-06-22 09:39:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()

On 22/06/2022 08:21, Liang He wrote:
> We need to add missing of_node_get() for of_find_matching_node() to
> keep refcount balance.
>
> Note: of_find_matching_node() will decrease the refcount of its first
> arg.
>
> Signed-off-by: Liang He <[email protected]>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 2 ++
> 1 file changed, 2 insertions(+)

Before applying the patch please check it carefully. Previous evidence
[1][2] suggests that not it was not even compiled.



[1] https://lore.kernel.org/all/[email protected]/

[2]
https://lore.kernel.org/all/[email protected]/


Best regards,
Krzysztof

2022-06-22 09:55:40

by Miaoqian Lin

[permalink] [raw]
Subject: Re: [PATCH] irqchip: Add missing of_ndoe_get() in its_of_probe()

Hi,

On 2022/6/22 16:34, Liang He wrote:
>
>
> At 2022-06-22 16:29:49, "Marc Zyngier" <[email protected]> wrote:
>> On Wed, 22 Jun 2022 09:15:56 +0100,
>> "Liang He" <[email protected]> wrote:
>>>
>>>
>>> At 2022-06-22 16:03:26, "Marc Zyngier" <[email protected]> wrote:
>>>> + Miaoqian Lin
>>>>
>>>> On Wed, 22 Jun 2022 07:21:38 +0100,
>>>> Liang He <[email protected]> wrote:
>>>>> We need to add missing of_node_get() for of_find_matching_node() to
>>>>> keep refcount balance.
>>>>>
>>>>> Note: of_find_matching_node() will decrease the refcount of its first
>>>>> arg.
>>>>>
>>>>> Signed-off-by: Liang He <[email protected]>
>>>> [...]
>>>>
>>>> Please send these refcount fixes as a series for all the irqchip
>>>> drivers, not one every other day.
>>>>
>>> Sorry, I will group similar bugs in future.
>>>
>>>
>>>> And please synchronise with Miaoqian Lin, as you are obviously both
>>>> chasing the same bugs.
>>>>
>>>> Thanks,
>>>>
>>>> M.
>>> Yes, before I send any new bug, I will confirm that this bug has not
>>> been reported in lore.kernel.org.
>> This is not what I meant. I am asking you to actively coordinate with
>> Miaoqian, working with them as a team instead of you both sending
>> competing series. I would like to see one series with patches from you
>> both.
> OK, I get it. This depends on Miaoqian.

Sure, I would like to work with Liang to fix these bugs.

>
> @[email protected]
>
>>> By the way, this is a bug missing |GET|, not |PUT|, which is
>>> different with Miaoqian's and my patches before.
It's a nice catch and I haven't noticed before.
>> Well, yet another reason for you both to work together, as you are
>> complementing each other.
>>
>> Thanks,
>>
>> M.
>>
>> --
>> Without deviation from the norm, progress is not possible.