Page MenuHomeFreeBSD

D46572.diff
No OneTemporary

D46572.diff

diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c
+++ b/sys/opencrypto/crypto.c
@@ -1289,6 +1289,18 @@
("incoming crp with separate output buffer "
"but no session support"));
+ if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) {
+ if (crp->crp_obuf.cb_type == CRYPTO_BUF_MBUF ||
+ crp->crp_obuf.cb_type == CRYPTO_BUF_SINGLE_MBUF) {
+ MPASS(M_WRITABLE(crp->crp_obuf.cb_mbuf));
+ }
+ } else {
+ if (crp->crp_buf.cb_type == CRYPTO_BUF_MBUF ||
+ crp->crp_buf.cb_type == CRYPTO_BUF_SINGLE_MBUF) {
+ MPASS(M_WRITABLE(crp->crp_buf.cb_mbuf));
+ }
+ }
+
switch (csp->csp_mode) {
case CSP_MODE_COMPRESS:
KASSERT(crp->crp_op == CRYPTO_OP_COMPRESS ||

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 12:34 PM (10 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11602925
Default Alt Text
D46572.diff (710 B)

Event Timeline