Date: Fri, 1 Nov 2002 17:00:40 -0800 From: Bill Fenner <fenner@research.att.com> To: tlambert2@mindspring.com Cc: mime@traveller.cz, current@FreeBSD.ORG Subject: Re: crash with network load (in tcp syncache ?) Message-ID: <200211020100.RAA10356@windsor.research.att.com> References: <200211012246.gA1Mki5n001478@stash.attlabs.att.com> <3DC31EB0.2B79F42E@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>I think this can still crash (just like my patch); the problem is in >what happens when it fails to allocate memory. Unless you set one of >the flags, it's still going to panic in the same place, I think, when >you run out of memory. No. The flags are only checked when so_head is not NULL. sonewconn() was handing sofree() an inconsistent struct so (so_head was set without being on either queue), i.e. sonewconn() was creating an invalid data structure. The call in sonewconn() used to be to sodealloc(), which didn't care about whether or not the data structure was self-consistent. The code was refactored to do reference counting, but the fact that the socket was inconsistent at that point wasn't noticed until now. The problem is not at all based on what happens in the allocation or protocol attach failure cases. The SYN cache is not involved, this is a bug in sonewconn(), plain and simple. Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211020100.RAA10356>