summaryrefslogtreecommitdiff
path: root/scripts/objdump-func
diff options
context:
space:
mode:
authorJeremy Erazo <mendozayt13@gmail.com>2026-05-20 18:23:31 +0000
committerSteve French <stfrench@microsoft.com>2026-05-27 17:15:24 -0500
commit426a35d7530722ffa2d89d759c39f5157e0e500d (patch)
tree4c69a025bedfde8e69e8c9b8af154a97bdb35331 /scripts/objdump-func
parente7ae89a0c97ce2b68b0983cd01eda67cf373517d (diff)
smb: client: detect short folioq copy in cifs_copy_folioq_to_iter()
cifs_copy_folioq_to_iter() copies a requested number of bytes from a folio queue into the destination iterator. Since the encrypted SMB2 READ path was changed to pass the server-declared payload length (data_len) instead of the larger folioq buffer length, the caller can ask for fewer bytes than the folio queue holds. In that case the helper continues walking the remaining folios after data_size has reached zero and calls copy_folio_to_iter() with len = 0, which is unnecessary work. The helper also returns 0 (success) when the folio queue is exhausted before data_size bytes have been copied. The caller has no way to distinguish that from a full copy and the reported transfer count ends up larger than the amount of data placed in the iterator. Add an early exit when data_size reaches zero, and return an error when the folio queue is exhausted before all requested bytes have been copied. Signed-off-by: Jeremy Erazo <mendozayt13@gmail.com> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'scripts/objdump-func')
0 files changed, 0 insertions, 0 deletions