Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154399568
D1444.id3043.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
924 B
Referenced Files
None
Subscribers
None
D1444.id3043.diff
View Options
Index: head/sys/kern/uipc_mbuf.c
===================================================================
--- head/sys/kern/uipc_mbuf.c
+++ head/sys/kern/uipc_mbuf.c
@@ -196,8 +196,7 @@
}
/* Book keeping. */
- len -= (mb->m_flags & M_EXT) ? mb->m_ext.ext_size :
- ((mb->m_flags & M_PKTHDR) ? MHLEN : MLEN);
+ len -= M_SIZE(mb);
if (mtail != NULL)
mtail->m_next = mb;
else
@@ -430,11 +429,8 @@
* unrelated kernel memory before or after us is trashed.
* No way to recover from that.
*/
- a = ((m->m_flags & M_EXT) ? m->m_ext.ext_buf :
- ((m->m_flags & M_PKTHDR) ? (caddr_t)(&m->m_pktdat) :
- (caddr_t)(&m->m_dat)) );
- b = (caddr_t)(a + (m->m_flags & M_EXT ? m->m_ext.ext_size :
- ((m->m_flags & M_PKTHDR) ? MHLEN : MLEN)));
+ a = M_START(m);
+ b = a + M_SIZE(m);
if ((caddr_t)m->m_data < a)
M_SANITY_ACTION("m_data outside mbuf data range left");
if ((caddr_t)m->m_data > b)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 8:41 AM (19 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32335173
Default Alt Text
D1444.id3043.diff (924 B)
Attached To
Mode
D1444: Use M_SIZE() and M_START() rather than inline implementations in uipc_mbuf.c
Attached
Detach File
Event Timeline
Log In to Comment