aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-02-06 21:51:57 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-02-22 20:45:28 +0000
commitfe67dc3e0797bacd009cd8e632e21ccfb83099d6 (patch)
treeb9a350e6724f0d38427746ad4df393af7c2bfe21
parentf9345b915b26b2eb9393687e6d2617f320004a04 (diff)
downloadsrc-fe67dc3e0797bacd009cd8e632e21ccfb83099d6.tar.gz
src-fe67dc3e0797bacd009cd8e632e21ccfb83099d6.zip
ccr,ccp: Fix argument order to sglist_append_vmpages.
The offset comes before the byte count. Reported by: br Reviewed by: asomers, markj MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D38375 (cherry picked from commit 70efe1a2fe13642732e56c7f040fe63f62bc6a6b)
-rw-r--r--sys/crypto/ccp/ccp.c2
-rw-r--r--sys/dev/cxgbe/crypto/t4_crypto.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/crypto/ccp/ccp.c b/sys/crypto/ccp/ccp.c
index 2b059dcee2ca..6e224d5f1544 100644
--- a/sys/crypto/ccp/ccp.c
+++ b/sys/crypto/ccp/ccp.c
@@ -112,7 +112,7 @@ ccp_populate_sglist(struct sglist *sg, struct crypto_buffer *cb)
break;
case CRYPTO_BUF_VMPAGE:
error = sglist_append_vmpages(sg, cb->cb_vm_page,
- cb->cb_vm_page_len, cb->cb_vm_page_offset);
+ cb->cb_vm_page_offset, cb->cb_vm_page_len);
break;
default:
error = EINVAL;
diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c
index 3d667ac5a405..a7d69d2d2bb0 100644
--- a/sys/dev/cxgbe/crypto/t4_crypto.c
+++ b/sys/dev/cxgbe/crypto/t4_crypto.c
@@ -295,7 +295,7 @@ ccr_populate_sglist(struct sglist *sg, struct crypto_buffer *cb)
break;
case CRYPTO_BUF_VMPAGE:
error = sglist_append_vmpages(sg, cb->cb_vm_page,
- cb->cb_vm_page_len, cb->cb_vm_page_offset);
+ cb->cb_vm_page_offset, cb->cb_vm_page_len);
break;
default:
error = EINVAL;