]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
afs: Fix total-length calculation for multiple-page send
authorDavid Howells <dhowells@redhat.com>
Thu, 2 Nov 2017 15:27:51 +0000 (15:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 13 Nov 2017 15:38:19 +0000 (15:38 +0000)
commit1199db603511d7463d9d3840f96f61967affc766
treef2f3031337d905ffbfd82ece97b2e89db501df01
parent5f0fc8ba6a1eec510a1e43def48697985d948a2c
afs: Fix total-length calculation for multiple-page send

Fix the total-length calculation in afs_make_call() when the operation
being dispatched has data from a series of pages attached.

Despite the patched code looking like that it should reduce mathematically
to the current code, it doesn't because the 32-bit unsigned arithmetic
being used to calculate the page-offset-difference doesn't correctly extend
to a 64-bit value when the result is effectively negative.

Without this, some FS.StoreData operations that span multiple pages fail,
reporting too little or too much data.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/rxrpc.c