linux_dsm_epyc7002/drivers/net/ethernet/freescale
Ioana Ciornei daa6eb5a14 dpaa2-ptp: fix double free of the ptp_qoriq IRQ
Upon reusing the ptp_qoriq driver, the ptp_qoriq_free() function was
used on the remove path to free any allocated resources.
The ptp_qoriq IRQ is among these resources that are freed in
ptp_qoriq_free() even though it is also a managed one (allocated using
devm_request_threaded_irq).

Drop the resource managed version of requesting the IRQ in order to not
trigger a double free of the interrupt as below:

[  226.731005] Trying to free already-free IRQ 126
[  226.735533] WARNING: CPU: 6 PID: 749 at kernel/irq/manage.c:1707
__free_irq+0x9c/0x2b8
[  226.743435] Modules linked in:
[  226.746480] CPU: 6 PID: 749 Comm: bash Tainted: G        W
5.4.0-03629-gfd7102c32b2c-dirty #912
[  226.755857] Hardware name: NXP Layerscape LX2160ARDB (DT)
[  226.761244] pstate: 40000085 (nZcv daIf -PAN -UAO)
[  226.766022] pc : __free_irq+0x9c/0x2b8
[  226.769758] lr : __free_irq+0x9c/0x2b8
[  226.773493] sp : ffff8000125039f0
(...)
[  226.856275] Call trace:
[  226.858710]  __free_irq+0x9c/0x2b8
[  226.862098]  free_irq+0x30/0x70
[  226.865229]  devm_irq_release+0x14/0x20
[  226.869054]  release_nodes+0x1b0/0x220
[  226.872790]  devres_release_all+0x34/0x50
[  226.876790]  device_release_driver_internal+0x100/0x1c0

Fixes: d346c9e86d ("dpaa2-ptp: reuse ptp_qoriq driver")
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-17 14:10:20 -08:00
..
dpaa dpaa_eth: register a device link for the qman portal used 2019-10-31 12:13:34 -07:00
dpaa2 dpaa2-ptp: fix double free of the ptp_qoriq IRQ 2019-12-17 14:10:20 -08:00
enetc enetc: disable EEE autoneg by default 2019-12-06 11:47:26 -08:00
fman net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
fs_enet drivers: net: Fix Kconfig indentation, continued 2019-11-21 11:54:09 -08:00
fec_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-22 16:27:24 -08:00
fec_mpc52xx_phy.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
fec_mpc52xx.c net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
fec_mpc52xx.h
fec_ptp.c net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message 2019-10-29 17:57:16 -07:00
fec.h net: fec: remove workaround to restart phylib state machine on MDIO timeout 2018-12-18 15:01:55 -08:00
fsl_pq_mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gianfar_ethtool.c gianfar: remove forward declarations 2019-09-05 12:28:14 +02:00
gianfar.c net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
gianfar.h gianfar: Maximize Rx buffer size 2019-11-06 10:25:20 -08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile enetc: Introduce basic PF and VF ENETC ethernet drivers 2019-01-24 21:55:53 -08:00
ucc_geth_ethtool.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ucc_geth.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ucc_geth.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
xgmac_mdio.c net/fsl: use of_property_read_bool 2016-08-08 16:15:00 -07:00