linux-stable/drivers/soc
Linus Torvalds 53ed2ac8fc soc: apple: mailbox: error pointers are negative integers
In an entirely unrelated discussion where I pointed out a stupid thinko
of mine, Rasmus piped up and noted that that obvious mistake already
existed elsewhere in the kernel tree.

An "error pointer" is the negative error value encoded as a pointer,
making the whole "return error or valid pointer" use-case simple and
straightforward.  We use it all over the kernel.

But the key here is that errors are _negative_ error numbers, not the
horrid UNIX user-level model of "-1 and the value of 'errno'".

The Apple mailbox driver used the positive error values, and thus just
returned invalid normal pointers instead of actual errors.

Of course, the reason nobody ever noticed is that the errors presumably
never actually happen, so this is fixing a conceptual bug rather than an
actual one.

Reported-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Link: https://lore.kernel.org/all/5c30afe0-f9fb-45d5-9333-dd914a1ea93a@prevas.dk/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-01-30 11:34:49 -08:00
..
amlogic pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem 2023-09-20 10:08:45 +02:00
apple soc: apple: mailbox: error pointers are negative integers 2024-01-30 11:34:49 -08:00
aspeed soc/aspeed: Convert to platform remove callback returning void 2023-10-13 15:04:12 +10:30
atmel soc: microchip: Explicitly include correct DT includes 2023-07-29 16:54:29 +03:00
bcm SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
canaan soc: canaan: Make K210_SYSCTL depend on CLK_K210 2023-03-15 14:22:53 +00:00
dove soc: dove: add missing of_node_put 2023-09-20 11:28:02 +02:00
fsl soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime 2023-12-12 10:29:20 +01:00
fujitsu soc/fujitsu: a64fx-diag: Convert to platform remove callback returning void 2023-10-14 23:27:01 +02:00
gemini
hisilicon soc: hisilicon: kunpeng_hccs: Support the platform with PCC type3 and interrupt ack 2023-12-07 06:16:35 +00:00
imx - Move Kconfig files into the pmdomain subsystem 2023-11-01 13:09:46 -10:00
ixp4xx soc/ixp4xx: ixp4xx-qmgr: Convert to platform remove callback returning void 2023-10-14 23:27:13 +02:00
lantiq
litex soc/litex: litex_soc_ctrl: Convert to platform remove callback returning void 2023-10-14 23:27:17 +02:00
loongson Convert drivers/soc to struct platform_driver::remove_new() 2023-10-16 22:51:31 +02:00
mediatek soc: mediatek: mtk-svs: Constify runtime-immutable members of svs_bank 2023-12-11 11:36:15 +01:00
microchip soc: microchip: mpfs: add auto-update subdev to system controller 2023-12-06 12:06:18 +00:00
nuvoton
pxa soc: pxa: ssp: fix casts 2024-01-09 08:25:29 +01:00
qcom drm-next for 6.8: 2024-01-12 11:32:19 -08:00
renesas soc: renesas: Make RZ/Five depend on !DMA_DIRECT_REMAP 2023-12-13 17:23:28 +01:00
rockchip SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
samsung soc: samsung: exynos-chipid: add exynosautov920 SoC support 2023-11-15 13:42:50 +01:00
sunxi pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
tegra SoC driver updates for 6.7 2023-11-01 14:46:51 -10:00
ti soc: ti: k3-socinfo: Add JTAG ID for J722S 2023-12-13 07:52:32 -06:00
ux500
versatile
xilinx Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
Kconfig soc: sifive: shunt ccache driver to drivers/cache 2023-11-22 11:49:25 +00:00
Makefile soc: sifive: shunt ccache driver to drivers/cache 2023-11-22 11:49:25 +00:00