diff options
| author | Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com> | 2025-11-20 10:12:04 +0100 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-11-25 12:32:41 +0100 |
| commit | d0b8fec8ae50525b57139393d0bb1f446e82ff7e (patch) | |
| tree | f7123346db688ce93444c9508059efaeb47bc75a /rust/helpers/vmalloc.c | |
| parent | 0f80e21bf6229637e193248fbd284c0ec44bc0fd (diff) | |
net: dsa: microchip: Fix symetry in ksz_ptp_msg_irq_{setup/free}()
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@vger.kernel.org
Fixes: cc13ab18b201 ("net: dsa: microchip: ptp: enable interrupt for timestamping")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20251120-ksz-fix-v6-5-891f80ae7f8f@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/helpers/vmalloc.c')
0 files changed, 0 insertions, 0 deletions
