[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d87f3e67-fc99-4076-8e9e-0a20ce387f1b@lunn.ch>
Date: Tue, 18 Nov 2025 17:32:17 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@...tlin.com>
Cc: Woojung Huh <woojung.huh@...rochip.com>, UNGLinuxDriver@...rochip.com,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Arun Ramadoss <arun.ramadoss@...rochip.com>,
Pascal Eberhard <pascal.eberhard@...com>,
Miquèl Raynal <miquel.raynal@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH net v5 5/5] net: dsa: microchip: Fix symetry in
ksz_ptp_msg_irq_{setup/free}()
On Tue, Nov 18, 2025 at 05:13:26PM +0100, Bastien Curutchet (Schneider Electric) wrote:
> The IRQ numbers created through irq_create_mapping() are only assigned
> to ptpmsg_irq[n].num at the end of the IRQ setup. So if an error occurs
> between their creation and their assignment (for instance during the
> request_threaded_irq() step), we enter the error path and fail to
> release the newly created virtual IRQs because they aren't yet assigned
> to ptpmsg_irq[n].num.
>
> Move the mapping creation to ksz_ptp_msg_irq_setup() to ensure symetry
> with what's released by ksz_ptp_msg_irq_free().
> In the error path, move the irq_dispose_mapping to the out_ptp_msg label
> so it will be called only on created IRQs.
>
> Cc: stable@...r.kernel.org
> Fixes: cc13ab18b201 ("net: dsa: microchip: ptp: enable interrupt for timestamping")
> Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@...tlin.com>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists