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-- 12.1 KB
Makefile -rw-r--r-- 1.6 KB
ath3k.c -rw-r--r-- 16.1 KB
bcm203x.c -rw-r--r-- 6.7 KB
bfusb.c -rw-r--r-- 15.6 KB
bluecard_cs.c -rw-r--r-- 19.8 KB
bpa10x.c -rw-r--r-- 9.5 KB
bt3c_cs.c -rw-r--r-- 14.7 KB
btbcm.c -rw-r--r-- 12.4 KB
btbcm.h -rw-r--r-- 2.6 KB
btintel.c -rw-r--r-- 17.0 KB
btintel.h -rw-r--r-- 4.9 KB
btmrvl_debugfs.c -rw-r--r-- 5.4 KB
btmrvl_drv.h -rw-r--r-- 5.0 KB
btmrvl_main.c -rw-r--r-- 17.9 KB
btmrvl_sdio.c -rw-r--r-- 40.4 KB
btmrvl_sdio.h -rw-r--r-- 3.3 KB
btmtkuart.c -rw-r--r-- 14.2 KB
btqca.c -rw-r--r-- 10.1 KB
btqca.h -rw-r--r-- 3.6 KB
btqcomsmd.c -rw-r--r-- 5.5 KB
btrsi.c -rw-r--r-- 4.6 KB
btrtl.c -rw-r--r-- 19.4 KB
btrtl.h -rw-r--r-- 2.6 KB
btsdio.c -rw-r--r-- 8.4 KB
btusb.c -rw-r--r-- 88.8 KB
btwilink.c -rw-r--r-- 8.5 KB
dtl1_cs.c -rw-r--r-- 12.4 KB
h4_recv.h -rw-r--r-- 3.5 KB
hci_ag6xx.c -rw-r--r-- 7.8 KB
hci_ath.c -rw-r--r-- 5.9 KB
hci_bcm.c -rw-r--r-- 30.3 KB
hci_bcsp.c -rw-r--r-- 18.7 KB
hci_h4.c -rw-r--r-- 6.0 KB
hci_h5.c -rw-r--r-- 21.1 KB
hci_intel.c -rw-r--r-- 30.4 KB
hci_ldisc.c -rw-r--r-- 20.0 KB
hci_ll.c -rw-r--r-- 19.6 KB
hci_mrvl.c -rw-r--r-- 8.6 KB
hci_nokia.c -rw-r--r-- 18.4 KB
hci_qca.c -rw-r--r-- 36.6 KB
hci_serdev.c -rw-r--r-- 8.5 KB
hci_uart.h -rw-r--r-- 5.2 KB
hci_vhci.c -rw-r--r-- 8.0 KB

back to top