From nobody Sun Feb 13 12:08:13 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A242619B0B19; Sun, 13 Feb 2022 12:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JxR2P484Cz4tfG; Sun, 13 Feb 2022 12:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644754093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPX/mT9XVMvvCC8gA5wK+2NEvsDOuhP34acmKERScp0=; b=tEWJfNR1qS3VXMu9jksOotqHnQstiLGzNdjDYejXumAMAPH3arU7bTnah5a0Vp3pTWEwhS YHJHoZH22qEgra7rBpR8AWOoQyIL2ft+uhvvPAARBgk2ZmNdFwGCsGZ44yw+J0u9vWagSH pFvMwa4Oc4gEujVA5m4lHIX7oNdmc+GC2qG2/oUh9UsJZUjVyaVz0QW7+UIPdFo4ix/JOP T883TciHG+iK6RuRUhtW6m1MRpnmYSkneiApKFE5Aku5RK3DTkdT/GiGHQNgwi0uE300cF SE+7nXy7ddiE7WJ2dlDnnPw+4JuQrhvVXj72Rb0ol2pd9SoOwvLy5PhoDxMF9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B2311AE2A; Sun, 13 Feb 2022 12:08:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21DC8DSF094251; Sun, 13 Feb 2022 12:08:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21DC8D1g094250; Sun, 13 Feb 2022 12:08:13 GMT (envelope-from git) Date: Sun, 13 Feb 2022 12:08:13 GMT Message-Id: <202202131208.21DC8D1g094250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Aleksandr Fedorov Subject: git: 85cd9f7e989b - stable/13 - ng pppoe(4): Add the required NET_EPOCH section to the hook disconnection function. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: afedorov X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 85cd9f7e989bab02aee32a5f25d517567a0cc928 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644754093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iPX/mT9XVMvvCC8gA5wK+2NEvsDOuhP34acmKERScp0=; b=RwhPVCp0eVdkn0cQURqfzYs3hWL6tdM4Reixu/S/fXQhrgDLtT/y1wcGGW/aCpLw8a6qxU w9u0tDWxnRqbMsxBK+P+vOg//MJE3QrqJwESgZVnAH+adSTbXZ4oURCiuDDqNZmDQa/bDx T3Xi/AHZbxgCCEounoRRnFDD8OAYlINZfv2thpoYeuxGnA16ni24F0PnL6ts3SybXt0oaq InjWpOdPjfimYfISnkWLZqCMkA4JMJB3U7wLa5QmhUvN2ettPjYKUaVHh9LOlbTwfV2qNW zEbCe6fD4u7l45M03+sWP247/0GROE3wFagQccAouqkFGDRjAnu69EcqCw1+sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644754093; a=rsa-sha256; cv=none; b=IVnf+NtoG5bTzSXUUfaY3V3Tn8k7oQnDMJSeph9PvCErrB//7nuz1SWuoL1f3XYoZJlTrX /uN4YJGNAQGTOENFk6TLFiAiwwQb9JTWR45xdpp26DLIt08M6/7GsdtvNZQIisijCOdPse paoXKS+7bEMlr0aBIInQ+iHOLs1a9p31sv39IxQVwe46E0wKLgiFtV4waW74hZxw/z5WyF Z+DJRZaGPXEeWLeclmaHeysx1Hcr6C3mdVVal7HZ26uwxOrjX937xxyTlQ+1lt607cHKuT NMK2yWcy47GBAL3PwWNfW/q7ScxK+xl/jsPx6TjKvTraE9yCDZi7G+SycQn2zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by afedorov: URL: https://cgit.FreeBSD.org/src/commit/?id=85cd9f7e989bab02aee32a5f25d517567a0cc928 commit 85cd9f7e989bab02aee32a5f25d517567a0cc928 Author: Aleksandr Fedorov AuthorDate: 2022-02-09 19:00:50 +0000 Commit: Aleksandr Fedorov CommitDate: 2022-02-13 12:05:45 +0000 ng pppoe(4): Add the required NET_EPOCH section to the hook disconnection function. Disconnecting hooks are called outside of NET_EPOCH, but ng_pppoe_disconnect() calls NG_SEND_DATA_ONLY() which should be called in NET_EPOCH. PR: 257067 Reported by: niels=freebsd@bakker.net Reviewed by: vmaffione (mentor), glebius, donner Approved by: vmaffione (mentor), glebius, donner Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D34185 (cherry picked from commit b27e6e91d0ad1f87b296f7583d4f5d938d7a997c) --- sys/netgraph/ng_pppoe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c index 295a136cc554..e07f77b9d541 100644 --- a/sys/netgraph/ng_pppoe.c +++ b/sys/netgraph/ng_pppoe.c @@ -2037,6 +2037,7 @@ ng_pppoe_disconnect(hook_p hook) log(LOG_NOTICE, "ng_pppoe[%x]: session out of " "mbufs\n", node->nd_ID); else { + struct epoch_tracker et; struct pppoe_full_hdr *wh; struct pppoe_tag *tag; int msglen = strlen(SIGNOFF); @@ -2067,8 +2068,11 @@ ng_pppoe_disconnect(hook_p hook) m->m_pkthdr.len = m->m_len = sizeof(*wh) + sizeof(*tag) + msglen; wh->ph.length = htons(sizeof(*tag) + msglen); + + NET_EPOCH_ENTER(et); NG_SEND_DATA_ONLY(error, privp->ethernet_hook, m); + NET_EPOCH_EXIT(et); } } if (sp->state == PPPOE_LISTENING)