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
fsl-mc
Kconfig -rw-r--r-- 5.5 KB
Makefile -rw-r--r-- 1.0 KB
arm-cci.c -rw-r--r-- 15.5 KB
brcmstb_gisb.c -rw-r--r-- 11.4 KB
da8xx-mstpri.c -rw-r--r-- 6.1 KB
hisi_lpc.c -rw-r--r-- 16.7 KB
imx-weim.c -rw-r--r-- 5.2 KB
mips_cdmm.c -rw-r--r-- 19.1 KB
mvebu-mbus.c -rw-r--r-- 36.4 KB
omap-ocp2scp.c -rw-r--r-- 3.5 KB
omap_l3_noc.c -rw-r--r-- 10.6 KB
omap_l3_noc.h -rw-r--r-- 12.3 KB
omap_l3_smx.c -rw-r--r-- 7.7 KB
omap_l3_smx.h -rw-r--r-- 8.0 KB
qcom-ebi2.c -rw-r--r-- 10.7 KB
simple-pm-bus.c -rw-r--r-- 1.3 KB
sun50i-de2.c -rw-r--r-- 1.1 KB
sunxi-rsb.c -rw-r--r-- 19.0 KB
tegra-aconnect.c -rw-r--r-- 2.1 KB
tegra-gmi.c -rw-r--r-- 7.5 KB
ti-sysc.c -rw-r--r-- 41.6 KB
ts-nbus.c -rw-r--r-- 8.9 KB
uniphier-system-bus.c -rw-r--r-- 7.8 KB
vexpress-config.c -rw-r--r-- 4.7 KB

back to top