Date: Mon, 3 Feb 2020 23:02:53 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Hans Petter Selasky <hps@selasky.org>, freebsd-net <freebsd-net@freebsd.org> Subject: Re: Does sosend() need CURVNET_SET/CURVNET_RESTORE? Message-ID: <YTBPR01MB3374AD4F73FF001D9D924F05DD000@YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <6ba3e3bd-d844-e685-7062-339e57438748@selasky.org> References: <YTBPR01MB337446173B7D480145BBB6C6DD010@YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM>, <6ba3e3bd-d844-e685-7062-339e57438748@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hans Petter Selasky wrote:=0A= >On 2020-02-02 22:22, Rick Macklem wrote:=0A= >> Hi,=0A= >>=0A= >> The current krpc code calls sosend() and soreceive() without any=0A= >> CURVNET_SET()/CURVNET_RESTORE() wrapped around them.=0A= >>=0A= >> When I recently used sosend_generic(), it panic'd without them.=0A= >>=0A= >> Do they need to be added around sosend()/soreceive()?=0A= >>=0A= >> I'll admit to knowing nothing about vnet.=0A= >>=0A= >> Thanks, rick=0A= >=0A= >What is the panic backtrace?=0A= I'd have to do it again to find out...=0A= =0A= >Usually one of these tree variants is used:=0A= >=0A= >CURVNET_SET(TD_TO_VNET(td));=0A= >CURVNET_SET(ifp->if_vnet);=0A= >CURVNET_SET(so->so_vnet);=0A= I got rid of the panic by adding the third one, which is what I now see=0A= sosend() uses.=0A= However, if sosend() is calling sosend_generic(), I'll just call sosend(),= =0A= which takes care of it.=0A= =0A= Thanks for your help, rick=0A= =0A= --HPS=0A= =0A= =0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTBPR01MB3374AD4F73FF001D9D924F05DD000>