Date: Tue, 7 Dec 2021 08:36:58 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Gleb Smirnoff <glebius@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: e3044071dec1 - main - in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch Message-ID: <bba8c856-7105-a644-5c73-db7bfd232b60@selasky.org> In-Reply-To: <202112062236.1B6Ma4e0073785@gitrepo.freebsd.org> References: <202112062236.1B6Ma4e0073785@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bba8c856-7105-a644-5c73-db7bfd232b60>