SUNRPC: Revert 241b1f41 ("SUNRPC: Remove xdr_buf_trim()")
Chuck Lever authored
commit 0a8e7b7d upstream.

I've noticed that when krb5i or krb5p security is in use,
retransmitted requests are missing the server's duplicate reply
cache. The computed checksum on the retransmitted request does not
match the cached checksum, resulting in the server performing the
retransmitted request again instead of returning the cached reply.

The assumptions made when removing xdr_buf_trim() were not correct.
In the send paths, the upper layer has already set the segment
lengths correctly, and shorting the buffer's content is simply a
matter of reducing buf->len.

xdr_buf_trim() is the right answer in the receive/unwrap path on
both the client and the server. The buffer segment lengths have to
be shortened one-by-one.

On the server side in particular, head.iov_len needs to be updated
correctly to enable nfsd_cache_csum() to work correctly. The simple
buf->len computation doesn't do that, and that results in...
d41689a3
Name Last commit Last update
Documentation USB: hub: Revert commit bd0e6c96 ("usb: hub: try old enumeration scheme first for high speed devices")
LICENSES LICENSES: Rename other to deprecated
arch ARM: dts: r8a7740: Add missing extal2 to CPG node
block iocost: protect iocg->abs_vdebt with iocg->waitq.lock
certs PKCS#7: Refactor verify_pkcs7_signature()
crypto gcc-10: avoid shadowing standard library 'free()' in crypto
drivers clk: Unlink clock if failed to prepare or enable
fs fanotify: fix merging marks masks with FAN_ONDIR
include SUNRPC: Revert 241b1f41 ("SUNRPC: Remove xdr_buf_trim()")
init x86: Fix early boot crash on gcc-10, third try
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
kernel Stop the ad-hoc games with -Wno-maybe-initialized
lib lib: devres: add a helper function for ioremap_uc
mm shmem: fix possible deadlocks on shmlock_user_lock
net SUNRPC: Revert 241b1f41 ("SUNRPC: Remove xdr_buf_trim()")
samples vmalloc: fix remap_vmalloc_range() bounds checks
scripts scripts/decodecode: fix trapping instruction formatting
security selinux: properly handle multiple messages in selinux_netlink_send()
sound Revert "ALSA: hda/realtek: Fix pop noise on ALC225"
tools selftests/ftrace: Check the first record for kprobe_args_type.tc
usr initramfs: restore default compression behavior
virt KVM: arm: vgic: Synchronize the whole guest on GIC{D,R}_I{S,C}ACTIVER read
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
.mailmap Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
COPYING COPYING: use the new text with points to the license files
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer
Kbuild kbuild: do not descend to ./Kbuild when cleaning
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL
Makefile gcc-10: disable 'restrict' warning for now
README Drop all 00-INDEX files from Documentation/
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.