diff --git a/sys/dev/sec/sec.c b/sys/dev/sec/sec.c index 342ee849aa2b..6af560e9bbb2 100644 --- a/sys/dev/sec/sec.c +++ b/sys/dev/sec/sec.c @@ -852,7 +852,7 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_mem *dma_mem, size = m_length(crp->crp_buf.cb_mbuf, NULL); break; case CRYPTO_BUF_VMPAGE: - size = PAGE_SIZE - cb->cb_vm_page_offset; + size = PAGE_SIZE - crp->crp_buf.cb_vm_page_offset; break; default: return (EINVAL);