opnsense-src/sys/dev/gpio
Andrew Turner bb8c68b253 acpi_gpiobus: Fix cleanup on set flags failure
When GPIOBUS_PIN_SETFLAGS fails we called gpiobus_free_ivars to clean
up the contents of the ivar, then would free the ivar. This lead to a
use-after-free as the ivar had already been set on the child so
gpiobus_child_deleted would try to free it again.

Fix this by removing the early cleanup and letting
gpiobus_child_deleted handle it.

Fixes:	c9e880c0ce ("gpiobus: Use a bus_child_deleted method to free ivars for children")
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D47670
2024-12-09 15:44:30 +00:00
..
dwgpio Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
acpi_gpiobus.c acpi_gpiobus: Fix cleanup on set flags failure 2024-12-09 15:44:30 +00:00
acpi_gpiobusvar.h GPIO: Add ACPI _AEI support 2024-10-31 14:26:34 -07:00
bytgpio.c bytgpio: expose PNP info 2024-07-29 14:09:08 -06:00
chvgpio.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
chvgpio_reg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
gpio_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
gpioaei.c GPIO: Add ACPI _AEI support 2024-10-31 14:26:34 -07:00
gpiobacklight.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gpiobus.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
gpiobus_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
gpiobusvar.h gpiobus: Make gpiobus_read_ivar extern 2024-10-25 19:34:57 -07:00
gpioc.c kern: Make fileops and filterops tables const where possible 2024-11-26 21:04:21 +00:00
gpioiic.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
gpiokeys.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gpiokeys.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
gpiokeys_codes.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
gpioled.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gpioled_fdt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gpiomdio.c Remove bogus detach routines 2024-11-04 20:31:16 -05:00
gpiopower.c gpiopower: trigger low, high and both edges 2024-01-28 13:29:41 +02:00
gpiopps.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
gpioregulator.c regulator: Move regulator code in dev/regulator 2024-01-10 19:20:32 +01:00
gpiospi.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
gpioths.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ofw_gpiobus.c Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
pl061.c dev/gpio: Mask all pl011 interrupts 2024-10-24 11:20:48 +01:00
pl061.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pl061_acpi.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
pl061_fdt.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
qoriq_gpio.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
qoriq_gpio.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00