From nobody Tue Dec 07 07:36:58 2021 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 EA16418C36E5; Tue, 7 Dec 2021 07:37:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4J7XF05fN2z3jpN; Tue, 7 Dec 2021 07:37:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5D558260072; Tue, 7 Dec 2021 08:37:07 +0100 (CET) Message-ID: Date: Tue, 7 Dec 2021 08:36:58 +0100 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: git: e3044071dec1 - main - in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch Content-Language: en-US To: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202112062236.1B6Ma4e0073785@gitrepo.freebsd.org> From: Hans Petter Selasky In-Reply-To: <202112062236.1B6Ma4e0073785@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4J7XF05fN2z3jpN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On 12/6/21 23:36, Gleb Smirnoff wrote: > 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); > You can ref the ifp before the EPOCH exit? --HPS