shamir rabinovitch c75ab8a55a net/rds: remove user triggered WARN_ON in rds_sendmsg
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>
2018-12-19 10:27:58 -08:00
..
2018-08-01 09:32:35 -07:00
2018-09-12 00:09:19 -07:00
2018-08-01 09:32:35 -07:00
2018-08-01 09:32:35 -07:00
2018-09-23 12:25:15 -07:00
2018-06-12 16:19:22 -07:00
2018-08-31 23:09:53 -07:00
2016-12-26 21:35:39 -05:00
2018-08-01 09:32:35 -07:00
2018-07-23 21:17:44 -07:00
2013-03-08 00:35:44 -05:00
2016-06-18 21:34:09 -07:00
2018-07-23 21:17:44 -07:00
2018-08-01 09:32:35 -07:00
2011-07-01 16:16:19 -07:00
2018-07-23 21:17:44 -07:00