From owner-freebsd-net Sun Jul 15 18:43:41 2001 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id 49B1737B401; Sun, 15 Jul 2001 18:43:35 -0700 (PDT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from localhost ([3ffe:501:100f:10c1:ed03:fbc7:d990:5678]) by shuttle.wide.toshiba.co.jp (8.9.1+3.1W/8.9.1) with ESMTP id KAA08771; Mon, 16 Jul 2001 10:45:23 +0900 (JST) Date: Mon, 16 Jul 2001 10:43:31 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: Garrett Wollman Cc: net@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Use of M_WAITOK in if_addmulti(). In-Reply-To: <200107152050.f6FKoae21142@khavrinen.lcs.mit.edu> References: <20010715120317.A99869@fump.kawo2.rwth-aachen.de> <20010716.001314.59549708.ume@mahoroba.org> <200107152050.f6FKoae21142@khavrinen.lcs.mit.edu> User-Agent: Wanderlust/2.5.8 (Smooth) Emacs/21.0 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 29 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Sun, 15 Jul 2001 16:50:36 -0400 (EDT), >>>>> Garrett Wollman said: >> Current if_addmulti() calls MALLOC() with M_WAITOK. However, >> if_addmulti() can be called from in[6]_addmulti() with splnet(). It >> may lead kernel panic. > This is not a problem (or should not be). It is permissible to sleep > while some interrupts are blocked; it is just not (in 4-stable) > permissible to sleep in interrupt context. The PR that I sent a few > days ago was an example of one such circumstance. Is it really the > case that in6_addmulti() can be invoked in interrupt context, Yes, it is. in6_update_ifa() can be called under an interrupt context, as you pointed out, and it calls in6_joingroup(), which then calls in6_addmulti(). > and if > so, why? When a new unicast address is configured, the configuring node must be join the solicited-node multicast group corresponding to the unicast address. Since the autoconfiguration procedure runs under an interrupt context, the joining routine also runs under the context. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message