From nobody Wed Nov 30 22:39:13 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 4NMvJd4GM6z4jDPh; Wed, 30 Nov 2022 22:39: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 4NMvJd38NGz4FpZ; Wed, 30 Nov 2022 22:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669847953; 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=z+y10F69Zd4s7tJxCMNfgA1L9z+UqEk2bR1stC9NaLQ=; b=Cx7XJ2o/+RU7Fe5BlPlnfDhkTpbsQjUZ0ce1AGMwbn8dyPr5K62ttuk9/xPz9wPxJ0g8Jr ajNJpquhD/ce8OIuySlHNN9MnsQOjBuqOLpyfdqMYT5OHubxZsOquLJbLGAMEiQZWLMxug /GKouQu6fOH7N6rA2b1/BCWdNRGz2MyU6pnj8kyy8VXCeLmEMOwZa+Q7x7vvCdiEAIAU5s jWQjJ/sZIPXNLh9Bkoglmz2r5b84ImoxmWfI6hXfDrp01KWySEqnbT4mC/KJX4IUC6dn9X Rw6Kxq/t8eORHbQZN2GzFy14yjeFIgImfNOdAoSzgY2teG2fnXK7TTqnp4paGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669847953; 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=z+y10F69Zd4s7tJxCMNfgA1L9z+UqEk2bR1stC9NaLQ=; b=WWnDzz1qYr6RVsvpKB8jhsRVNuH60otChNmMFwxT+C0oFKe7WWHwRrheoI9Dmp2kwyArxL JjD/mM/yk2YjqIwPlhOwzGca+O0VMZGgRuYwFrB3HqOHPhL1xgxTJfg36uMrMx63o0R530 pUhfnqIgt0ylS51V7f0/b3lS4FvTLR1j04ZbfoHI5zFmm1QyiGEl0B8rFvfRzKEL/QbqhI ysDI7AXKIse+MVW91Uw/IbXGGsgUQ+0hK1UsPK10wAf7+9SDEQDru8+3TjTdxrXMs4bWB2 VzRumUaDRFOzdaFVTOvmsI3N5IVmmxGpqN3Jc/zZ4CNVAes6EVcgxnm5xQAH6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669847953; a=rsa-sha256; cv=none; b=MCiAESpSIBQXx8UtAqCWJzqIUBGK11LzKeN6bWY9iYgYV2V3Z+KIcNAgAM1ymyb3CAaQXq daU6C4c12ui6dtvgNroGYz6sVs26OGm4H/E5Q8AYvoG0S0KVzqknXa7B2tS/vspjrhV6CS zhcSFkHKxrnoMZAGTwEHbHfWB5EU+NdwE68kaX9yUtIWFQXwmNJaSxSQ4gkHra5q474zGk uqrQP5Hix8kHTKkFw0sLfrOIgIsEuSHmQ+3RRfkTRattMj9OwEFtsl+39LmxyND5Kt0WWM ryh5vcXPsPZq0J/xBLpHVL7C6fJuXOzsfP/AMl8ZKCHEvsuuEp/ipi39lU6Igw== 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 4NMvJd1v1GzDfd; Wed, 30 Nov 2022 22:39: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 2AUMdD9o029864; Wed, 30 Nov 2022 22:39:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AUMdDtE029863; Wed, 30 Nov 2022 22:39:13 GMT (envelope-from git) Date: Wed, 30 Nov 2022 22:39:13 GMT Message-Id: <202211302239.2AUMdDtE029863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d00c20882f88 - main - udp[6]_multi_input: Don't unlock freed inp. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d00c20882f88877884b73fa9ec86b3cafeda4e42 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d00c20882f88877884b73fa9ec86b3cafeda4e42 commit d00c20882f88877884b73fa9ec86b3cafeda4e42 Author: John Baldwin AuthorDate: 2022-11-30 22:38:51 +0000 Commit: John Baldwin CommitDate: 2022-11-30 22:38:51 +0000 udp[6]_multi_input: Don't unlock freed inp. If udp[6]_append() returns non-zero, it is because the inp has gone away (inpcbrele_rlocked returned 1 after running the tunnel function). Reviewed by: ae Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D37511 --- sys/netinet/udp_usrreq.c | 1 - sys/netinet6/udp6_usrreq.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 8e8547a42922..719b39985a0f 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -446,7 +446,6 @@ udp_multi_input(struct mbuf *m, int proto, struct sockaddr_in *udp_in) else UDP_PROBE(receive, NULL, inp, ip, inp, uh); if (udp_append(inp, ip, n, sizeof(struct ip), udp_in)) { - INP_RUNLOCK(inp); break; } else appends++; diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index b6390f800d98..b491a41a7a4b 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -312,7 +312,6 @@ udp6_multi_input(struct mbuf *m, int off, int proto, UDP_PROBE(receive, NULL, inp, ctx.ip6, inp, ctx.uh); if (udp6_append(inp, n, off, fromsa)) { - INP_RUNLOCK(inp); break; } else appends++;