Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jan 2022 14:35:28 +0100
From:      Kristof Provost <kp@freebsd.org>
To:        Wojciech Macek <wma@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 889c60500d30 - main - ip_mroute: release epoch lock if mrouter is not configured
Message-ID:  <EE1676EA-2523-488A-97F2-011B945107FB@freebsd.org>
In-Reply-To: <202201221049.20MAn6Qn093231@gitrepo.freebsd.org>
References:  <202201221049.20MAn6Qn093231@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I think there=E2=80=99s an early return in ip_mroiter_done() that doesn=E2=80=
=99t unlock as well.=20

I=E2=80=99m also unsure if epoch provides the protection you=E2=80=99re look=
ing for.=20

Kristof
(On mobile, so short and no code pointers)

> On 22 Jan 2022, at 11:49, Wojciech Macek <wma@freebsd.org> wrote:
>=20
> =EF=BB=BFThe branch main has been updated by wma:
>=20
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D889c60500d30c8fd3cbf597fd73=
d5cd90f5fc7e7
>=20
> commit 889c60500d30c8fd3cbf597fd73d5cd90f5fc7e7
> Author:     Wojciech Macek <wma@FreeBSD.org>
> AuthorDate: 2022-01-22 10:47:39 +0000
> Commit:     Wojciech Macek <wma@FreeBSD.org>
> CommitDate: 2022-01-22 10:48:30 +0000
>=20
>    ip_mroute: release epoch lock if mrouter is not configured
>=20
>    Add mising "else" branch to release a lock if mrouter is not
>    configured.
>=20
>    Obtained from:          Semihalf
>    Sponsored by:           Stormshield
> ---
> sys/netinet/raw_ip.c | 2 ++
> 1 file changed, 2 insertions(+)
>=20
> diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
> index 08ce848a63f7..229716918875 100644
> --- a/sys/netinet/raw_ip.c
> +++ b/sys/netinet/raw_ip.c
> @@ -890,6 +890,8 @@ rip_detach(struct socket *so)
>    MROUTER_RLOCK();
>    if (so =3D=3D V_ip_mrouter && ip_mrouter_done)
>        ip_mrouter_done(MROUTER_RLOCK_PARAM_PTR);
> +    else
> +        MROUTER_RUNLOCK();
>=20
>    INP_WLOCK(inp);
>    INP_HASH_WLOCK(&V_ripcbinfo);
>=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EE1676EA-2523-488A-97F2-011B945107FB>