[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<TYCPR01MB12093A2984117267AC18D679CC2762@TYCPR01MB12093.jpnprd01.prod.outlook.com>
Date: Mon, 30 Sep 2024 16:36:20 +0000
From: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
To: Marc Zyngier <maz@...nel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Geert Uytterhoeven
<geert+renesas@...der.be>, Prabhakar Mahadev Lad
<prabhakar.mahadev-lad.rj@...renesas.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, Chris Paterson <Chris.Paterson2@...esas.com>,
Biju Das <biju.das.jz@...renesas.com>, "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH] irqchip/renesas-rzg2l: Fix missing put_device
Hi Marc,
Thanks for your feedback.
> From: Marc Zyngier <maz@...nel.org>
> Sent: Monday, September 30, 2024 4:50 PM
> To: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
> Subject: Re: [PATCH] irqchip/renesas-rzg2l: Fix missing put_device
>
> On Mon, 30 Sep 2024 15:55:39 +0100,
> Fabrizio Castro <fabrizio.castro.jz@...esas.com> wrote:
> >
> > rzg2l_irqc_common_init calls of_find_device_by_node, but the
> > corresponding put_device call is missing.
> >
> > Make sure we call put_device both when failing and when succeeding.
>
> What sort of lifetime are you trying to enforce?
Function rzg2l_irqc_common_init uses pdev->dev until its very end.
My understanding is that we should decrement the reference counter
once we are fully done with it. Is my understanding correct?
Thanks,
Fab
>
> It looks to me that you'd be better off doing *one* device_put() right after you have found the parent
> domain, but that completely depends on the above.
>
> Thanks,
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists