svn commit: r253314 - head/sys/net

Mikolaj Golub trociny at FreeBSD.org
Sat Jul 13 08:22:05 UTC 2013


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


More information about the svn-src-all mailing list