Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2013 11:21:59 +0300
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        Adrian Chadd <adrian@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r253314 - head/sys/net
Message-ID:  <20130713082158.GD2757@gmail.com>
In-Reply-To: <201307130425.r6D4P31J078644@svn.freebsd.org>
References:  <201307130425.r6D4P31J078644@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 13, 2013 at 04:25:03AM +0000, Adrian Chadd wrote:

> +static int
> +lagg_sysctl_active(SYSCTL_HANDLER_ARGS)
> +{
> +	struct lagg_softc *sc = (struct lagg_softc *)arg1;
> +	struct lagg_port *lp;
> +	int error;
> +
> +	/* LACP tracks active links automatically, the others do not */
> +	if (sc->sc_proto != LAGG_PROTO_LACP) {
> +		sc->sc_active = 0;
> +		SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
> +			sc->sc_active += LAGG_PORTACTIVE(lp);

Shouldn't sc be wlocked here?

> +	}
> +
> +	error = sysctl_handle_int(oidp, &sc->sc_active, 0, req);
> +	if ((error) || (req->newptr == NULL))
> +		return (error);
> +
> +	return (0);
> +}

-- 
Mikolaj Golub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130713082158.GD2757>