Maksim Yevmenkin e72a94adc3 Fix sbappendrecord_locked().
The main problem is that sbappendrecord_locked() relies on sbcompress()
to set sb_mbtail. This will not happen if sbappendrecord_locked() is
called with mbuf chain made of exactly one mbuf (i.e. m0->m_next == NULL).
In this case sbcompress() will be called with m == NULL and will do
nothing. I'm not entirely sure if m == NULL is a valid argument for
sbcompress(), and, it rather pointless to call it like that, but keep
calling it so it can do SBLASTMBUFCHK().

The problem is triggered by the SOCKBUF_DEBUG kernel option that
enables SBLASTRECORDCHK() and SBLASTMBUFCHK() checks.

PR:			kern/126742
Investigated by:	pluknet < pluknet -at- gmail -dot- com >
No response from:	freebsd-current@, freebsd-bluetooth@
MFC after:		3 days
2009-04-21 19:14:13 +00:00
..
2009-04-15 20:43:12 +00:00
2008-11-29 14:32:14 +00:00
2009-04-20 15:10:03 +00:00
2008-09-23 14:25:56 +00:00
2008-08-03 21:07:19 +00:00
2008-11-27 04:40:37 +00:00
2008-09-22 10:37:02 +00:00
2008-05-12 06:42:06 +00:00
2008-05-23 04:06:49 +00:00
2007-12-14 21:30:51 +00:00
2009-03-30 15:01:29 +00:00
2009-04-21 19:14:13 +00:00
2009-04-10 04:08:34 +00:00
2009-04-13 23:09:44 +00:00