Date: Mon, 3 Feb 2020 22:59:36 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Kristof Provost <kp@FreeBSD.org> Cc: freebsd-net <freebsd-net@freebsd.org> Subject: Re: Does sosend() need CURVNET_SET/CURVNET_RESTORE? Message-ID: <YTBPR01MB3374372120674C746D75F504DD000@YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <E4E34E8E-0EE1-41FC-A365-1070DF16B076@FreeBSD.org> References: <YTBPR01MB337446173B7D480145BBB6C6DD010@YTBPR01MB3374.CANPRD01.PROD.OUTLOOK.COM>, <E4E34E8E-0EE1-41FC-A365-1070DF16B076@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Kristof Provost wrote:=0A= >On 2 Feb 2020, at 13:22, Rick Macklem wrote:=0A= >> The current krpc code calls sosend() and soreceive() without any=0A= >> CURVNET_SET()/CURVNET_RESTORE() wrapped around them.=0A= >>=0A= >sosend() and soreceive() do the CURVENT_SET()/CURVNET_RESTORE() dance=0A= >for you.=0A= Duh, I'm getting old. When I looked at sosend(), I didn't spot the CURVNET = calls=0A= in it.=0A= =0A= >> When I recently used sosend_generic(), it panic'd without them.=0A= >>=0A= >sosend_generic() does not, because usually sosend() calls it, so it=92d=0A= >already be set.=0A= Ok, I had thought the=0A= error =3D so->so_proto->pr_usrreqs->pru_sosend(so, addr, ui= o,=0A= 1706 top, control, flags, td);=0A= call in sosend() was calling tcp_usr_send().=0A= If it is just calling sosend_generic(), then I can just call sosend() for t= he=0A= KERN_TLS case. I'll check to see if sosend() is calling sosend_generic().= =0A= =0A= Thanks for your help, rick=0A= =0A= Best regards,=0A= Kristof=0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTBPR01MB3374372120674C746D75F504DD000>