From nobody Mon Dec 06 22:36:04 2021 X-Original-To: dev-commits-src-main@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 D40A018BF936; Mon, 6 Dec 2021 22:36:04 +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 4J7JDh4B6vz3hFN; Mon, 6 Dec 2021 22:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 6BCE7146D3; Mon, 6 Dec 2021 22:36:04 +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 1B6Ma4aR073786; Mon, 6 Dec 2021 22:36:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6Ma4e0073785; Mon, 6 Dec 2021 22:36:04 GMT (envelope-from git) Date: Mon, 6 Dec 2021 22:36:04 GMT Message-Id: <202112062236.1B6Ma4e0073785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e3044071dec1 - main - in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3044071dec1d752a7103b5ae55fe3cff2f5b957 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638830164; 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=99LTO5PHSbgTbqmYeiWeM+NuRjlc9ZUFkjErqyFFvjI=; b=UzAmG/RSQqLhG5sDwwUfFOMsojBKvJUUKiCeNL7rHyMs1kne86iKxdZ4e2P47zrNTySKlm hjia0fHcJW3HO9Vm5EW3Ogk+xWznf4s2A3H++s7eRz4QfJxWoKr5w+yCu7FFuA3JEO+GG7 tHMGeQkwYogeG6/qWyyIhDTqj1LDeAmD3XGxHIZQ7+dEDOORRHf/qtj+YHVLj8EAZxL6us ZWaIQe83tI3qOuhkkzi4dTNuvPaJazvrd1gFBJw7/qxjeLeXUpGP70QuFHKtgMHtpNJcei QioguVimirISvIO6gCt2HQ/l8dIF2uGD13zWN+CgQFChvRRZGSBhl8laVdAa8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638830164; a=rsa-sha256; cv=none; b=g8vhCl9zfYwqaaoxCebwQA0CIsK1iiAMP9h1iDbFnsG/QRdLNE1pBxnqvTvSGhGfceaH4p m3ZOzKsf9JRJha+U50MJO1r55ygomm8Wx/2nda6d+Gj0BrovvczYGAyOWrCMo8ytngW/iR Ai/GxCTXXmyEwqiTYs2Em9Oa34ooTX25n7YZsnIoTPxE8RxV/zOSLkpSkDEchYUcRLRxK/ fdHg7AoTuXYQTej5kJpdlq6IWFmbISvWOcFRLcnLiSRquvS8Lmqr01kFlKcYpX7ewfWVGH joAGsiaptvZFuQIcCKo/Dvo6Kapk0fFmHTjgJFlLAE49PUE1WNlYBaF0FDDa1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e3044071dec1d752a7103b5ae55fe3cff2f5b957 commit e3044071dec1d752a7103b5ae55fe3cff2f5b957 Author: Gleb Smirnoff AuthorDate: 2021-12-06 22:33:23 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-06 22:33:23 +0000 in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch Fixes: d74b7baeb0d4 --- sys/netinet6/in6_mcast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c index b1b161ace1b8..d0f8186e75c7 100644 --- a/sys/netinet6/in6_mcast.c +++ b/sys/netinet6/in6_mcast.c @@ -2454,9 +2454,9 @@ in6p_set_multicast_if(struct inpcb *inp, struct sockopt *sopt) return (EADDRNOTAVAIL); } } + NET_EPOCH_EXIT(et); /* XXXGL: unsafe ifp */ imo = in6p_findmoptions(inp); - imo->im6o_multicast_ifp = ifp; /* XXXGL: reference?! */ - NET_EPOCH_EXIT(et); + imo->im6o_multicast_ifp = ifp; INP_WUNLOCK(inp); return (0);