opnsense-src/sys/arm
Mark Johnston cec5431f2c sound: Check for errors from sndbuf_resize()
Most implementations of CHANNEL_SETBLOCKSIZE and CHANNEL_SETFRAGMENTS
were not checking this.  This is probably not a big problem: it's
unlikely for sndbuf_resize() to fail due to the refcount check in this
case since it's operating on the hardware buffer, which doesn't get
mmaped.  But, I will add more reasons for it to fail in the next patch,
so let's be more careful.

This change modifies various CHANNEL_SETBLOCKSIZE implementations to
check for errors.  In some cases I reordered things to avoid updating
driver state until after sndbuf_resize() succeeds.

Return 0 from CHANNEL_SETBLOCKSIZE to indicate an error, as it otherwise
returns the new block size.  We could change the interface to return
both an error number and a block size, but that would break at least one
out-of-tree driver and I wish to avoid that here.  Make sure that errors
from CHANNEL_SETFRAGMENTS are returned to userspace.

Approved by:	so
Security:	FreeBSD-SA-26:71.sound
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D60553
2026-10-15 11:28:53 +02:00
..
allwinner style(9): white space after ; and around binary operators 2026-02-05 22:52:32 +01:00
annapurna/alpine Restore #include <sys/devmap.h> 2025-05-29 12:14:25 +02:00
arm bus: Document special ranges of IVARs 2026-09-23 10:52:48 +02:00
broadcom/bcm2835 Fix xhci detection on Raspberry Pi 400 2026-04-24 15:44:33 -06:00
conf arm: tweak imx module build logic 2025-10-23 15:31:32 -03:00
freescale sound: Check for errors from sndbuf_resize() 2026-10-15 11:28:53 +02:00
include arm: Make init_proc0 static 2026-04-24 11:26:39 -04:00
mv arm/mv: Fix typo in a kernel error message 2025-11-08 21:12:20 +01:00
nvidia sys: Don't pass RF_ALLOCATED to bus_alloc_resource* 2026-04-24 13:33:52 -04:00
qemu sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
qualcomm Restore #include <sys/devmap.h> 2025-05-29 12:14:25 +02:00
rockchip Add driver for the RK3328 GPIO_MUTE pin 2025-03-18 13:00:19 -04:00
ti arm/ti: Fix typo in a KASSERT message 2025-11-08 21:15:57 +01:00
xilinx gpio: remove gpiobus_attach_bus 2025-08-13 14:14:00 +03:00