FreeBSD Bugzilla – Attachment 242118 Details for
Bug 271288
FreeBSD 13.2; Alignment Fault ; virtio-net
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fixed the KASSERT check I did previously
if_vtnet.c.patch (text/plain), 577 bytes, created by
martin
on 2023-05-11 12:35:22 UTC
(
hide
)
Description:
fixed the KASSERT check I did previously
Filename:
MIME Type:
Creator:
martin
Created:
2023-05-11 12:35:22 UTC
Size:
577 bytes
patch
obsolete
>--- usr/src/sys/dev/virtio/network/if_vtnet.c.orig 2023-05-11 12:32:45.895577000 +0000 >+++ usr/src/sys/dev/virtio/network/if_vtnet.c 2023-05-11 12:32:52.895675000 +0000 >@@ -1541,7 +1541,13 @@ > return (NULL); > } > >- m->m_len = size; >+ #define VTNET_ALIGNMENT_FUDGE 2 >+ m->m_data += VTNET_ALIGNMENT_FUDGE; >+ >+ KASSERT(size > VTNET_ALIGNMENT_FUDGE, >+ ("%s: mbuf size (%d) is smaller than VTNET_ALIGNMENT_FUDGE (%d)", __func__, size, VTNET_ALIGNMENT_FUDGE)); >+ >+ m->m_len = size - VTNET_ALIGNMENT_FUDGE; > if (m_head != NULL) { > m_tail->m_next = m; > m_tail = m;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271288
:
242085
|
242118
|
242125
|
242127