From nobody Thu Apr 14 08:00:28 2022 X-Original-To: dev-commits-src-all@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 E19691B462DF; Thu, 14 Apr 2022 08:00:28 +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 4KfBhr5hNQz3Bn4; Thu, 14 Apr 2022 08:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649923228; 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=DYC8TZPLHNQylDZpnpgSDra8y332p5fDmXczPDrMbUQ=; b=mLrS5AZKSetfRtd2F8Sh+46rWEyJ1dKZd/PXK5z75Ejc/25a6rhiubKEP4n1Qe88e3t1sg s9m/Pkdes+XdAPyAt0H6hAp7YUbnrBb7YkL0W65lN9ifqD9ezrUVGoMktBlGkaNgcfNM+C L5sqV/LC1kMpKVbHlT0BjuSKlVp73Z8oi9qyKTAdd7vTxTt17RsRi7tNueTv0R1Ezaqb0K 3ujlGWezbm1082xnCbOc3zWlR/TjJsPX4qw33ytpfBtDtIz4p9iVEbjWw1k6njj4U3Ng46 v0pCDYWLD3haO/tfCdu84BE16RIEK/dz0iWrf0uwFISHWebXyDpY2vtNDLb3Rg== 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 632371C771; Thu, 14 Apr 2022 08:00:28 +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 23E80SMY003003; Thu, 14 Apr 2022 08:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23E80SJv003002; Thu, 14 Apr 2022 08:00:28 GMT (envelope-from git) Date: Thu, 14 Apr 2022 08:00:28 GMT Message-Id: <202204140800.23E80SJv003002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 9f8c2b37e740 - stable/12 - pf: use ERROUT_IOCTL() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9f8c2b37e740d5debff577daa97b1b1b5a7827b1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649923228; 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=DYC8TZPLHNQylDZpnpgSDra8y332p5fDmXczPDrMbUQ=; b=nRnXMQSuCi9Pl2/tFS2N5Mc4LSSzhYte/VOCrH0VoGMXTb7iZoW+3Ri/l/qFx/WEfDe9nI HKt3fbAhlujDvb7bTEljpwJJCK12+mdyyQPPED7J04YOGtBzZMlZC663BKHVCJBmelPwWy X9+hVtw9ZdmzjCplxoxdvRfQ0XcFZ0qt5zDQ0Q+JotG1qaYExduQuEiqg4WIRnMTN1Kivc sTUeasjznf/Z/1W+GKRxKWfabVCMdM4rygndQZXckfVxnTucif+K4ohb7M0OUazgY90Hfj dAn36at/5d4OFKPUVobGmbaNi4FtVvup3sehDkNN1k/C5Lfs2+bQuugHMol9/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649923228; a=rsa-sha256; cv=none; b=Wbe2boC8FaqNiKW5nLSg/2KSVHoRl8KWqvASQ9vM/gHzSUzKjPT0ErcQ658fCctm5CsW3g 7TFug8e3ZuSX2C3PrDtKzmDCEVOUzm3WR7mLbW0tL9GiN79hOId+VaUjo8HuJQecQC8Kg3 AjcwbkNJpcffGUWFfrcLBCgUzY+s9Nu0vT8ysn+TdwUE8k+Z3EOe78O0Y7dNDQ4acl6SqD CaG+im2HnMSVSWiKcOS8fcNqG+o34pIxr7WGFiEXuw7eVh4sX9iiJhsr3OEB+s3kjFDrXk AU9F66nyRdcDYpQo9DksOVxn6OMQaXOopLGrW07/roYsHH2aXRZ4jptlcYEUZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f8c2b37e740d5debff577daa97b1b1b5a7827b1 commit 9f8c2b37e740d5debff577daa97b1b1b5a7827b1 Author: Kristof Provost AuthorDate: 2022-04-06 14:45:18 +0000 Commit: Kristof Provost CommitDate: 2022-04-14 07:50:18 +0000 pf: use ERROUT_IOCTL() Use ERROUT_IOCTL() rather than hand-rolling the macro. This adds DTrace SDTs in the error path, making debugging ioctl errors easier. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit bef7104571f35eeffc27b25d8857a7940dd23ab8) --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 11be26ad9438..e2b5d0704f16 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2651,7 +2651,7 @@ DIOCGETRULENV_error: TAILQ_INIT(&newrule->rpool.list); } -#define ERROUT(x) { error = (x); goto DIOCCHANGERULE_error; } +#define ERROUT(x) ERROUT_IOCTL(DIOCCHANGERULE_error, x) PF_RULES_WLOCK(); #ifdef PF_WANT_32_TO_64_COUNTER