Date: Sun, 02 Jul 2023 11:59:29 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 272319] FreeBSD kernel crash on MPD5 restart with PPP configuration. Message-ID: <bug-272319-7501-QpMnweVJGK@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-272319-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-272319-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272319 --- Comment #8 from Aleksandr Fedorov <afedorov@FreeBSD.org> --- I think fix should look like this: diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index ba9845410e42..7074549ae403 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -936,12 +936,18 @@ ng_ksocket_shutdown(node_p node) /* Close our socket (if any) */ if (priv->so !=3D NULL) { - SOCKBUF_LOCK(&priv->so->so_rcv); - soupcall_clear(priv->so, SO_RCV); - SOCKBUF_UNLOCK(&priv->so->so_rcv); - SOCKBUF_LOCK(&priv->so->so_snd); - soupcall_clear(priv->so, SO_SND); - SOCKBUF_UNLOCK(&priv->so->so_snd); + /* + * SOLISTENNIG sockets doesn't have data upcalls. + */ + if (!SOLISTENING(priv->so)) { + SOCKBUF_LOCK(&priv->so->so_rcv); + soupcall_clear(priv->so, SO_RCV); + SOCKBUF_UNLOCK(&priv->so->so_rcv); + SOCKBUF_LOCK(&priv->so->so_snd); + soupcall_clear(priv->so, SO_SND); + SOCKBUF_UNLOCK(&priv->so->so_snd); + } + soclose(priv->so); priv->so =3D NULL; } --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272319-7501-QpMnweVJGK>