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
samsung
tegra
Kconfig -rw-r--r-- 5.0 KB
Makefile -rw-r--r-- 1004 bytes
Makefile.asm-offsets -rw-r--r-- 233 bytes
atmel-ebi.c -rw-r--r-- 14.7 KB
atmel-sdramc.c -rw-r--r-- 2.3 KB
brcmstb_dpfe.c -rw-r--r-- 18.7 KB
da8xx-ddrctl.c -rw-r--r-- 4.1 KB
emif-asm-offsets.c -rw-r--r-- 633 bytes
emif.c -rw-r--r-- 54.7 KB
emif.h -rw-r--r-- 19.6 KB
fsl-corenet-cf.c -rw-r--r-- 6.7 KB
fsl_ifc.c -rw-r--r-- 8.9 KB
jz4780-nemc.c -rw-r--r-- 9.7 KB
mtk-smi.c -rw-r--r-- 11.3 KB
mvebu-devbus.c -rw-r--r-- 9.9 KB
of_memory.c -rw-r--r-- 4.8 KB
of_memory.h -rw-r--r-- 1.1 KB
omap-gpmc.c -rw-r--r-- 68.8 KB
pl172.c -rw-r--r-- 8.1 KB
ti-aemif.c -rw-r--r-- 12.6 KB
ti-emif-pm.c -rw-r--r-- 9.5 KB
ti-emif-sram-pm.S -rw-r--r-- 9.9 KB

back to top