From owner-freebsd-current@FreeBSD.ORG Fri Jan 16 00:12:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D75716A4CE for ; Fri, 16 Jan 2004 00:12:39 -0800 (PST) Received: from cheer.mahoroba.org (flets20-024.kamome.or.jp [218.45.20.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id A526243D5A for ; Fri, 16 Jan 2004 00:12:33 -0800 (PST) (envelope-from ume@FreeBSD.org) Received: from plum.ssr.bisd.hitachi.co.jp (ume@plum.v6.spacecom.netspace.or.jp [IPv6:2001:200:165:100:2a0:c9ff:fe8c:143d]) (user=ume mech=CRAM-MD5 bits=0)i0G8CRmw066770; Fri, 16 Jan 2004 17:12:27 +0900 (JST) (envelope-from ume@FreeBSD.org) Date: Fri, 16 Jan 2004 17:12:27 +0900 Message-ID: From: Hajimu UMEMOTO To: "Bjoern A. Zeeb" In-Reply-To: References: <20040115041435.7B739A6@coconut.itojun.org> User-Agent: xcite1.38> Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC1MWhsoQg==?=) X-Operating-System: FreeBSD 4.8-RELEASE-p13 MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on cheer.mahoroba.org cc: core@kame.net cc: current@freebsd.org cc: Jun-ichiro itojun Hagino Subject: Re: [PATCH] IPSec fixes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2004 08:12:39 -0000 Hi, >>>>> On Thu, 15 Jan 2004 22:16:59 +0000 (UTC) >>>>> bzeeb-lists@lists.zabbadoz.net ("Bjoern A. Zeeb") said: bzeeb-lists> I have built a HEAD kernel from this evening. bzeeb-lists> crashing the kernel is more easy than booting it... bzeeb-lists> So the big question at the moment is - why will it not happen if I bzeeb-lists> remove the unlink call from the spdflush ? What am I missing ? bzeeb-lists> If anybody has any more ideas please let me know; I will nost likely bzeeb-lists> not find the time for more debugging until sat eve. Do you mean that following patch itojun offered doesn't help for you? It seems fix the problem here. Index: sys/netkey/key.c diff -up sys/netkey/key.c.orig sys/netkey/key.c --- sys/netkey/key.c.orig Fri Jan 16 17:06:26 2004 +++ sys/netkey/key.c Fri Jan 16 17:07:38 2004 @@ -1958,7 +1958,6 @@ key_spdadd(so, m, mhp) newsp->lifetime = lft ? lft->sadb_lifetime_addtime : 0; newsp->validtime = lft ? lft->sadb_lifetime_usetime : 0; - newsp->refcnt = 1; /* do not reclaim until I say I do */ newsp->state = IPSEC_SPSTATE_ALIVE; LIST_INSERT_TAIL(&sptree[newsp->dir], newsp, secpolicy, chain); @@ -7591,9 +7590,10 @@ key_sp_unlink(sp) { /* remove from SP index */ - if (__LIST_CHAINED(sp)) + if (__LIST_CHAINED(sp)) { LIST_REMOVE(sp, chain); - key_freesp(sp); + key_freesp(sp); + } } /* XXX too much? */ Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/