Subject: Re:Re: [PATCH] net: marvell: Fix refcounting bugs in prestera_port_sfp_bind()

From: "Liang He" <[email-masked]>
Date: Wed, 21 Sep 2022 21:26:17 +0800 (CST)

At 2022-09-21 20:36:35, "Jakub Kicinski" <[email-masked]> wrote:
>On Wed, 21 Sep 2022 17:02:52 +0800 (CST) Liang He wrote:
>> At 2022-09-21 08:45:29, "Jakub Kicinski" <[email-masked]> wrote:
>> >On Thu, 15 Sep 2022 12:06:55 +0800 Liang He wrote:  
>> >> In prestera_port_sfp_bind(), there are two refcounting bugs:
>> >> (1) we should call of_node_get() before of_find_node_by_name() as
>> >> it will automaitcally decrease the refcount of 'from' argument;
>> >> (2) we should call of_node_put() for the break of the iteration
>> >> for_each_child_of_node() as it will automatically increase and
>> >> decrease the 'child'.
>> >> 
>> >> Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
>> >> Signed-off-by: Liang He <[email-masked]>  
>> >
>> >Please repost and CC all the authors of the patch under Fixes.  
>> 
>> Thanks for your reply, Jakub
>> 
>> As I was the only one author, you mean following tag format:
>> 
>> ""
>> Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
>> CC: Liang He <[email-masked]>
>> Signed-off-by: Liang He <[email-masked]>
>
>No, no, CC the authors of the patch under fixes, which is to say -
>the patch which introduced the problem. The fixes tag you have is:
>
>Fixes: 52323ef75414 ("net: marvell: prestera: add phylink support")
>
>so:
>
>commit 52323ef75414d60b17f683076833eb55a6bffa2b
>Author: Oleksandr Mazur <[email-masked]>
>Date:   Tue Jul 19 13:57:16 2022 +0300
>
>    net: marvell: prestera: add phylink support
>    
>    For SFP port prestera driver will use kernel
>    phylink infrastucture to configure port mode based on
>    the module that has beed inserted
>    
>    Co-developed-by: Yevhen Orlov <[email-masked]>
>    Signed-off-by: Yevhen Orlov <[email-masked]>
>    Co-developed-by: Taras Chornyi <[email-masked]>
>    Signed-off-by: Taras Chornyi <[email-masked]>
>    Signed-off-by: Oleksandr Mazur <[email-masked]>
>    Signed-off-by: David S. Miller <[email-masked]>
>

>I was asking to also CC Yevhen and Oleksandr. Taras seems already CCed.

Thanks very much, I will follow this rule in my future patches.

Liang