https://github.com/torvalds/linux
Revision c75ab8a55ac1083c232e4407f52b0cadae6c1e0e authored by shamir rabinovitch on 16 December 2018, 07:01:09 UTC, committed by David S. Miller on 19 December 2018, 18:27:58 UTC
per comment from Leon in rdma mailing list
https://lkml.org/lkml/2018/10/31/312 :

Please don't forget to remove user triggered WARN_ON.
https://lwn.net/Articles/769365/
"Greg Kroah-Hartman raised the problem of core kernel API code that will
use WARN_ON_ONCE() to complain about bad usage; that will not generate
the desired result if WARN_ON_ONCE() is configured to crash the machine.
He was told that the code should just call pr_warn() instead, and that
the called function should return an error in such situations. It was
generally agreed that any WARN_ON() or WARN_ON_ONCE() calls that can be
triggered from user space need to be fixed."

in addition harden rds_sendmsg to detect and overcome issues with
invalid sg count and fail the sendmsg.

Suggested-by: Leon Romanovsky <leon@kernel.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: shamir rabinovitch <shamir.rabinovitch@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ea01007
History
Tip revision: c75ab8a55ac1083c232e4407f52b0cadae6c1e0e authored by shamir rabinovitch on 16 December 2018, 07:01:09 UTC
net/rds: remove user triggered WARN_ON in rds_sendmsg
Tip revision: c75ab8a
File Mode Size
Kconfig -rw-r--r-- 26.3 KB
Makefile -rw-r--r-- 5.1 KB
internals.h -rw-r--r-- 1.2 KB
spi-altera.c -rw-r--r-- 5.9 KB
spi-armada-3700.c -rw-r--r-- 24.0 KB
spi-at91-usart.c -rw-r--r-- 10.2 KB
spi-ath79.c -rw-r--r-- 7.4 KB
spi-atmel.c -rw-r--r-- 46.5 KB
spi-au1550.c -rw-r--r-- 25.7 KB
spi-axi-spi-engine.c -rw-r--r-- 15.0 KB
spi-bcm-qspi.c -rw-r--r-- 36.3 KB
spi-bcm-qspi.h -rw-r--r-- 3.0 KB
spi-bcm2835.c -rw-r--r-- 23.0 KB
spi-bcm2835aux.c -rw-r--r-- 15.0 KB
spi-bcm63xx-hsspi.c -rw-r--r-- 13.7 KB
spi-bcm63xx.c -rw-r--r-- 17.2 KB
spi-bitbang-txrx.h -rw-r--r-- 3.3 KB
spi-bitbang.c -rw-r--r-- 11.1 KB
spi-brcmstb-qspi.c -rw-r--r-- 1.5 KB
spi-butterfly.c -rw-r--r-- 8.4 KB
spi-cadence.c -rw-r--r-- 22.7 KB
spi-cavium-octeon.c -rw-r--r-- 2.5 KB
spi-cavium-thunderx.c -rw-r--r-- 2.6 KB
spi-cavium.c -rw-r--r-- 3.5 KB
spi-cavium.h -rw-r--r-- 7.2 KB
spi-clps711x.c -rw-r--r-- 4.7 KB
spi-coldfire-qspi.c -rw-r--r-- 13.1 KB
spi-davinci.c -rw-r--r-- 27.7 KB
spi-dln2.c -rw-r--r-- 20.7 KB
spi-dw-mid.c -rw-r--r-- 7.9 KB
spi-dw-mmio.c -rw-r--r-- 6.6 KB
spi-dw-pci.c -rw-r--r-- 3.5 KB
spi-dw.c -rw-r--r-- 14.6 KB
spi-dw.h -rw-r--r-- 6.3 KB
spi-efm32.c -rw-r--r-- 11.8 KB
spi-ep93xx.c -rw-r--r-- 19.7 KB
spi-falcon.c -rw-r--r-- 10.4 KB
spi-fsl-cpm.c -rw-r--r-- 10.1 KB
spi-fsl-cpm.h -rw-r--r-- 1.6 KB
spi-fsl-dspi.c -rw-r--r-- 28.5 KB
spi-fsl-espi.c -rw-r--r-- 21.3 KB
spi-fsl-lib.c -rw-r--r-- 4.3 KB
spi-fsl-lib.h -rw-r--r-- 3.3 KB
spi-fsl-lpspi.c -rw-r--r-- 12.0 KB
spi-fsl-spi.c -rw-r--r-- 22.6 KB
spi-fsl-spi.h -rw-r--r-- 2.0 KB
spi-geni-qcom.c -rw-r--r-- 18.7 KB
spi-gpio.c -rw-r--r-- 13.7 KB
spi-img-spfi.c -rw-r--r-- 20.7 KB
spi-imx.c -rw-r--r-- 43.9 KB
spi-iproc-qspi.c -rw-r--r-- 4.2 KB
spi-jcore.c -rw-r--r-- 5.3 KB
spi-lantiq-ssc.c -rw-r--r-- 26.1 KB
spi-lm70llp.c -rw-r--r-- 9.0 KB
spi-loopback-test.c -rw-r--r-- 26.5 KB
spi-lp8841-rtc.c -rw-r--r-- 5.9 KB
spi-mem.c -rw-r--r-- 13.1 KB
spi-meson-spicc.c -rw-r--r-- 16.2 KB
spi-meson-spifc.c -rw-r--r-- 11.3 KB
spi-mpc512x-psc.c -rw-r--r-- 16.1 KB
spi-mpc52xx-psc.c -rw-r--r-- 13.0 KB
spi-mpc52xx.c -rw-r--r-- 14.1 KB
spi-mt65xx.c -rw-r--r-- 22.4 KB
spi-mxs.c -rw-r--r-- 16.0 KB
spi-nuc900.c -rw-r--r-- 8.9 KB
spi-oc-tiny.c -rw-r--r-- 8.6 KB
spi-omap-100k.c -rw-r--r-- 12.4 KB
spi-omap-uwire.c -rw-r--r-- 12.4 KB
spi-omap2-mcspi.c -rw-r--r-- 40.5 KB
spi-orion.c -rw-r--r-- 21.1 KB
spi-pic32-sqi.c -rw-r--r-- 18.6 KB
spi-pic32.c -rw-r--r-- 22.6 KB
spi-pl022.c -rw-r--r-- 67.9 KB
spi-ppc4xx.c -rw-r--r-- 13.6 KB
spi-pxa2xx-dma.c -rw-r--r-- 6.4 KB
spi-pxa2xx-pci.c -rw-r--r-- 7.2 KB
spi-pxa2xx.c -rw-r--r-- 47.4 KB
spi-pxa2xx.h -rw-r--r-- 3.4 KB
spi-qcom-qspi.c -rw-r--r-- 14.3 KB
spi-qup.c -rw-r--r-- 32.8 KB
spi-rb4xx.c -rw-r--r-- 5.1 KB
spi-rockchip.c -rw-r--r-- 22.2 KB
spi-rspi.c -rw-r--r-- 35.2 KB
spi-s3c24xx-fiq.S -rw-r--r-- 2.9 KB
spi-s3c24xx-fiq.h -rw-r--r-- 671 bytes
spi-s3c24xx.c -rw-r--r-- 15.1 KB
spi-s3c64xx.c -rw-r--r-- 38.0 KB
spi-sc18is602.c -rw-r--r-- 8.5 KB
spi-sh-hspi.c -rw-r--r-- 6.1 KB
spi-sh-msiof.c -rw-r--r-- 38.9 KB
spi-sh-sci.c -rw-r--r-- 4.8 KB
spi-sh.c -rw-r--r-- 11.2 KB
spi-sirf.c -rw-r--r-- 35.5 KB
spi-slave-mt27xx.c -rw-r--r-- 13.2 KB
spi-slave-system-control.c -rw-r--r-- 3.6 KB
spi-slave-time.c -rw-r--r-- 2.9 KB
spi-sprd-adi.c -rw-r--r-- 13.6 KB
spi-sprd.c -rw-r--r-- 18.7 KB
spi-st-ssc4.c -rw-r--r-- 11.0 KB
spi-stm32-qspi.c -rw-r--r-- 12.1 KB
spi-stm32.c -rw-r--r-- 34.7 KB
spi-sun4i.c -rw-r--r-- 13.8 KB
spi-sun6i.c -rw-r--r-- 14.8 KB
spi-tegra114.c -rw-r--r-- 33.1 KB
spi-tegra20-sflash.c -rw-r--r-- 16.3 KB
spi-tegra20-slink.c -rw-r--r-- 34.0 KB
spi-test.h -rw-r--r-- 5.3 KB
spi-ti-qspi.c -rw-r--r-- 20.5 KB
spi-tle62x0.c -rw-r--r-- 7.2 KB
spi-topcliff-pch.c -rw-r--r-- 45.7 KB
spi-txx9.c -rw-r--r-- 10.8 KB
spi-uniphier.c -rw-r--r-- 12.2 KB
spi-xcomm.c -rw-r--r-- 5.8 KB
spi-xilinx.c -rw-r--r-- 14.5 KB
spi-xlp.c -rw-r--r-- 11.7 KB
spi-xtensa-xtfpga.c -rw-r--r-- 4.0 KB
spi-zynqmp-gqspi.c -rw-r--r-- 34.7 KB
spi.c -rw-r--r-- 96.7 KB
spidev.c -rw-r--r-- 21.4 KB

back to top