Linux: avoid oops in memcpy_toiovec
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 12 Aug 2010 20:33:04 +0000 (16:33 -0400)
committerDerrick Brashear <shadow@dementia.org>
Thu, 12 Aug 2010 20:57:18 +0000 (13:57 -0700)
commit90b75531add729ecbcc46f2a6fb070993b96bcec
treefbc6cdc157b33e5db403395d0188346697e0b99c
parent08552ad8a94f7cc5908aabe8385711e09a6418e4
Linux: avoid oops in memcpy_toiovec

With ADAPT_PMTU enabled, kernel_recvmsg can be called to receive
errors.  The call is made with no iovec supplied (we pass a NULL
pointer), but with a size of 256.  In the kernel, the memcpy_toiovec
function tests for size > 0, and proceeds to check iovec->iov_len,
which causes an oops.  Fix by setting the size to 0.

Change-Id: I3c672c2e67d0aa5af2bd54d0c14aaeae3bb3c530
Reviewed-on: http://gerrit.openafs.org/2546
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/LINUX/rx_knet.c