Linux: Do not initialize msghdr's msg_iter/msg_iov 08/15408/3
authorCheyenne Wills <cwills@sinenomine.net>
Tue, 25 Apr 2023 16:37:01 +0000 (10:37 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 28 Apr 2023 00:28:45 +0000 (20:28 -0400)
commit5a7630acfd8bfd462b633475a6e195d9dbdfb451
treef05da5d8bf75074b4928795e1fe51833428f0c42
parentbbb1e8adfed6804ac6fbae0a073dc6927096e16a
Linux: Do not initialize msghdr's msg_iter/msg_iov

Since the initial Linux commit (2.6.12-rc2) the Linux function
kernel_recvmsg() handles the initialization of the msghdr members
related to the iov (msghdr.msg_iter and for earlier kernels
msghdr.msg_iov and msghdr.msg_iovlen).

The code in osi_NetReceive for Linux unnecessarily initializes these
structure members prior to calling kernel_recvmsg().

Remove the unnecessary code from osi_NetReceive along with the
surrounding preprocessor check for STRUCT_MSGHDR_HAS_MSG_ITER.  Since
this is the only location that uses this define, also remove the
associated autoconf test.

NOTE: This was discovered while investigating changes needed for
Linux 6.4, due to: "iov_iter: add iter_iovec() helper" (de4f5fed3f)
which renamed the Linux structure iter_iovec's member iov to __iov.
Since the openafs code that was affected by the Linux 6.4 change is
being removed as unnecessary, this commit is not Linux 6.4 specific,
but effects all versions of Linux.

Change-Id: Id9931728ad96b07e5e1c3472d9689fe6dd2905f9
Reviewed-on: https://gerrit.openafs.org/15408
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/cf/linux-kernel-struct.m4
src/rx/LINUX/rx_knet.c