Robert Watson a0ca087183 When dropping a packet and issuing a reset during TCP segment handling,
unconditionally drop the tcbinfo lock (after all, we assert it lines
before), but call tcp_dropwithreset() under both inpcb and inpcbinfo
locks only if we pass in an tcpcb.  Otherwise, if the pointer is NULL,
firewall code may later recurse the global tcbinfo lock trying to look
up an inpcb.

This is an instance where a layering violation leads not only
potentially to code reentrace and recursion, but also to lock
recursion, and was revealed by the conversion to rwlocks because
acquiring a read lock on an rwlock already held with a write lock is
forbidden.  When these locks were mutexes, they simply recursed.

Reported by:	Stefan Ehmann <shoesoft at gmx dot net>
MFC after:	3 days
2008-09-24 11:07:03 +00:00
..
2008-08-07 09:06:04 +00:00
2008-08-25 05:49:16 +00:00
2008-08-25 05:49:16 +00:00
2008-07-29 09:06:35 +00:00
Nit
2008-08-09 11:28:57 +00:00
2008-07-29 09:06:35 +00:00
2008-07-29 09:06:35 +00:00
2008-08-28 09:44:07 +00:00
2008-08-28 09:44:07 +00:00
2007-03-24 22:15:02 +00:00
2008-06-11 22:12:50 +00:00
2007-09-24 05:26:24 +00:00
2008-08-25 05:57:56 +00:00
2007-07-10 09:30:46 +00:00