diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -71,6 +71,7 @@ #include #include #include +#include #endif /* Some initial values */ @@ -489,6 +490,7 @@ static __inline void _crypto_use_mbuf(struct crypto_buffer *cb, struct mbuf *m) { + MPASS(M_WRITABLE(m)); cb->cb_mbuf = m; cb->cb_type = CRYPTO_BUF_MBUF; } @@ -532,6 +534,7 @@ static __inline void crypto_use_single_mbuf(struct cryptop *crp, struct mbuf *m) { + MPASS(M_WRITABLE(m)); _crypto_use_single_mbuf(&crp->crp_buf, m); }